Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type ('a, 'b) t =
- | F of ('a -> 'b)
- | O : ('c, 'b) t * ('a, 'c) t -> ('a, 'b) t
- let (@) g f = fun x -> x |> f |> g
- let rec compute (f : ('a, 'b) t) : 'a -> 'b = (* ... The type constructor c#29 would escace its scope *)
- match f with
- | F f1 -> f1
- | O (f1, f2) ->
- let f1' : 'c -> 'b = compute f1 in
- let f2' : 'a -> 'c = compute f2 in
- f1' @ f2'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement