Hacker News new | ask | show | jobs
by Pompidou 558 days ago
No. In APL deriverd array programming languages, verbs (or functions) are monadic or dyadic : they accept only one or two arguments :

In '1 + 1', + is a dyadic operator, while in 'exp 5', exp is monadic.

In J, and in APL I guess, left arg is usually understood as 'control data', while right arg is the data upon which calculation is done. Left argument is usually left unchanged after calculations.

In this way, is it possible to create multi-arguments verbs, by placing boxed args on the left of the verb.

3 comments

Unfortunate naming coincidence which is confusing. Couldn't we just call those unary and binary operators rather?
It sounds unrelated to the monads popularized by Haskell tutorials. Naming coincidence or am I missing something?
Naming coincidence, they are in fact unrelated.
A `monad` in Category Theory (which is where Haskell gets them from, ultimately) is a single-argument functor and two natural transformations, so there probably is a through-line here in terms of one-argument function-likes.
APL's use of 'monad' predates Haskell's existence by decades.
...and Leibniz's "windowless monads" (all three concepts are pairwise distinct, related solely by the greek prefix for 'single') predates APL and Haskell by centuries.
Thanks kindly.