Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This seems exactly the same to me just with more complicated type names.


Indeed it is :)

Dropping an example in TryOcaml[0]:

    let f : int -> int = fun _ -> 1 ;;
    val f : int -> int = <fun>
    let ex : int list = [f] ;;
    Line 1, characters 21-22:
    Error: This expression has type int -> int but an expression was expected of type
      int

[0]: https://try.ocamlpro.com/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: