Skip to content

Instantly share code, notes, and snippets.

@ihodes
Created November 3, 2015 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ihodes/4dfe9a7ca62c9bc10a81 to your computer and use it in GitHub Desktop.
Save ihodes/4dfe9a7ca62c9bc10a81 to your computer and use it in GitHub Desktop.
utop # class intlist (l: int list) =
object
method empty = (l = [])
method fold f acc = List.fold_left f acc l
end;;
Error: Some type variables are unbound in this type: class intlist : int list ->
object
method empty : bool
method fold : ('a -> int -> 'a) -> 'a -> 'a
end
The method fold has type ('a -> int -> 'a) -> 'a -> 'a where 'a
is unbound
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment