[plt-scheme] Paren Paralysis Sufferers Unite

From: Prabhakar Ragde (plragde at uwaterloo.ca)
Date: Wed Oct 21 22:02:32 EDT 2009

hendrik wrote:

> OK.  Here's what I used in a Lisp dialect once:
> 
>      ( foofoofoo / barbarbar )
> 
> means
> 
>      ( foofoofoo ( barbarbar ))
> 
> where foofoofoo and barbarbar are each sequences of s-expressions.
> 
> Of course, you can iterate:
> 
>     ( foo / bar / clum / ink )
> 
> means
> 
>     ( foo ( bar ( clum ( ink ))))
> 
> And that's all there is to it.

This is similar to the way that the $ infix operator (function 
application) is used in Haskell.

foo (bar (clum (ink)))

becomes

foo $ bar $ clum $ ink

John Clements once teased me for using $ in a short snippet of Haskell I 
wrote. Like all syntactic sugar, overuse increases the chance of 
diabetes. (There, I have left an opening for a pun, if anyone cares to 
pursue it.) --PR


Posted on the users mailing list.