Hacker News new | ask | show | jobs
by AlexCoventry 3212 days ago
Agreed, but that is quite readable to someone familiar with ML-based languages: Define a function get_internal which takes a map from objects of type 'a to type 'b, and an object of type 'a, and return a wrapper around objects of type 'b or "undefined"s. Action of get_internal is ""get" [@@bs.send]", which I don't recognize. I would guess it's a javascript interop syntax, which returns a function consistent with get_internal's type signature.

You're not constrained to use one-letter names for type variables, or to drop names of argument variables, but it turns out to be very handy, and it only takes reading a couple of hundred lines of code to get comfortable with this notation.