3 ms·
Haskell is a special beast, in the sense that it uses single letters a lot for generic types in signatures. Eg: doFoo :: a -> a where doFoo will take any ty
by mercurial 14y ago
Haskell is a special beast, in the sense that it uses single letters a lot for generic types in signatures. Eg:
doFoo :: a -> a
where doFoo will take any type a and return something of the same type. Due to the density of the language, you'll often find plenty of small, commented functions.
- Tyr42 14y agoCompare doubleCompose binary_func transformation first_arg second_arg = binary_func (transformation first_arg) (transformation second_arg) vs doubleCompose (b -> b -> c) -> (a -> b) -> a -> a -> c doubleCompose (+) f x y = (f x) + (f y) (also known as the `on` function). There's hardly any good names for x and y, since they can be anything at all.