Arc Forumnew | comments | leaders | submitlogin
3 points by shiro 6166 days ago | link | parent

You might get some ideas from the discussion done for srfi-26, which is a kind of Scheme's answer for this type of shorthand notation. http://srfi.schemers.org/srfi-26/mail-archive/maillist.html

    (cut + 1 <>)   is (lambda (x) (+ 1 x))
    (cut + <> <>)  is (lambda (x y) (+ x y))
The possibility of allowing changing argument orders by numbering them were discussed, but eventually dropped, since you can always fall back to lambda (arc's fn). So making it general would just increase complexity without gaining much more expressive power. At least that was the consensus there. (Of course you can argue otherwise)


1 point by almkglor 6163 days ago | link

#|create a lambda that doubles the given number|#

(= double-number [+ _ _])

-----