Login
From:
Thomas Letan’s website
(Uncensored)
subscribe
Writing a Function Whose Argument is a Polymorphic Function in OCaml · ~lthms
https://soap.coffee/~lthms/posts/RankNTypesInOCaml.html
links
backlinks
Roast topics
Find topics
Find it!
In OCaml, it is not possible to write a function whose argument is a polymorphic function. Trying to write such a function results in the type-checker complaining back at you. The trick to be able to write such a function is to use records.