[plt-scheme] Paren Paralysis Sufferers Unite

From: Laurent (laurent.orseau at gmail.com)
Date: Thu Oct 22 05:12:57 EDT 2009

For a limited version of this, there also exists the compose function :
((compose foo bar clum ink))

Laurent


On Thu, Oct 22, 2009 at 04:02, Prabhakar Ragde <plragde at uwaterloo.ca> wrote:

> 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
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20091022/4cb23a96/attachment.html>

Posted on the users mailing list.