[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

curly-infix in dotted notation

This page is part of the web mail archives of SRFI 105 from before July 7th, 2015. The new archives for SRFI 105 contain all messages, not just those from before July 7th, 2015.

You know, an s-expr of the form:

 (superop op a b c ...)

can be expressed in a curly-infix dotted notation as:

(superop . {a op b op c op ...})

So for example, if you want a list of the sum of the numbers in two
other lists as and bs:

(map . {as + bs})

And if you want a procedure that adds 2 to its argument:

(cut . {<> + 2})