4 ms·
But I believe this is also with the spirit of the article. Your functions still assume something about input and are polymorphic over everything else in it. AF
by youerbt 7y ago
But I believe this is also with the spirit of the article. Your functions still assume something about input and are polymorphic over everything else in it.
AFAIK this can also be done in a type safe manner in languages which support extensible records/row polymorphism.
- yakshaving_jgt 7y agoYou don't need row polymorphism to write a function which operates on a collection of key/value pairs and expects a specific key to exist at runtime. This works in Haskell, just as it does in Clojure.
- wereHamster 7y agoPlease write the Haskell type signature of such a function, as an example.
- yakshaving_jgt 7y agof :: Map String String -> Map String String