4 ms·
A really helpful edit would be the V1 and V2 macro expansions; then it's fairly straightforward C with an odd naming scheme.
by icen 9y ago
A really helpful edit would be the V1 and V2 macro expansions; then it's fairly straightforward C with an odd naming scheme.
- klibertp 9y agoI don't think so. It's easier to see if something is monadic or dyadic with the macros, and you don't need to parse the function head to know what args and of what types it takes.
- cormacrelf 9y ago> monadic or dyadic Also known as unary and binary, TIL. They're arity, not FP monads.
- evincarofautumn 9y agoAdicity is an alternate naming scheme for arity, based on Greek rather than Latin roots.
- mjn 9y agoAlso a common naming scheme in music, which is where APL got the terms from: one note is a monad, two simultaneously is a dyad, three is a triad, four is a tetrad, etc. Fwiw APL's use of monad in this sense predates the FP use of the term by several decades.
- Xophmeister 9y agoMonads, in the FP sense, come from the same construction in Category Theory. According to Wikipedia, this was first "invented" in 1958, but the term "monad" was coined later by Saunders Mac Lane.