packages feed

alms-0.4.9: examples/ex02-type-error.alms

(* An Ill-Typed Module (type error) *)

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

let inc2 =
  fun y: int ->
    let g = ap (fun z: int -> z + 1) in
      g (g y)   (* g: (int -o int) is used twice here *)

in print[int] (inc2 5)