Preferences

First line of https://t3x.org/klong/prime.html

"The braces around an expression denote a function. Because this function contains a single variable, x, it is a monadic function or a monad."

I never understood that about monads, even if it's litterally their name.


kragen
A monadic function in APL-family languages is not related to monads from category theory, which are the ones you see in Haskell, nor to Leibniz's monads.
kazinator
In this context it just means "one parameter function".

It looks like every apparently free variable in a Klong brace expression is actually bound as a function parameter.

This is so in basic algebra in that we can think of, say, x^2 + y^2 as a two parameter function, even without writing out the full f(x, y) = x^2 + y^2 notation with the f(x, y) head.

A two parameter function would be called "dyadic" in the jargon which calls one argument functions "monadic".

This item has no comments currently.