packages feed

alms-0.6.0: examples/ex03-blame-error.alms

(* A Blameworthy Coercion *)

let ap (f: int -o int) =
    ((fun x -> f x) :> int -> int)

let inc2 y =
  let g = ap ((+) 1) in
    g (g y)   (* g is used twice here *)

in print (inc2 5)