4 ms·
There's no such thing as a function with no arguments in Haskell. f :: () -> T is a function that still takes a (meaningless) value g = map f list is just a
by rtpg 13y ago
There's no such thing as a function with no arguments in Haskell.
f :: () -> T is a function that still takes a (meaningless) value
g = map f list is just a value.
- kazagistar 13y agoAn (IO a), or even more so, a (State a) or (Reader a) very often seems exactly like a function with no arguments in any imperative language.
- Argorak 13y agoThats what I meant, everything is a function and can be expressed as one, even most syntax (the literal 1 => Num a -> a)