On 7/20/12, David A. Wheeler <dwhee...@dwheeler.com> wrote:
>> Of course, the lack of true currying means that a slight variant like:
> .   foo(bar(nitz quux(meow)))
> ...
>
> True, the operator is less helpful in this case.  You could do this:
>
> .    foo $$ bar nitz quux(meow)
>

Actually, the intent of SUBLIST is that the above can be written as:

foo $$ bar nitz $$ quux meow

First, consider the first $$:

EXPR1 = (foo)
EXPR2 = bar nitz $$ quux meow

Now EXPR2 needs to have its own $$ processed:

subEXPR1 = (bar nitz)
subEXPR2 = (quux meow)
append1(subEXPR1 subEXPR2) =
append(subEXPR1 list(subEXPR2)) =
append( '(bar nitz) list('(quux meow)) =
(bar nitz (quux meow))

EXPR2 = (bar nitz (quux meow))

append1(EXPR1 EXPR2) =
append(EXPR1 list(EXPR2)) =
append('(foo) list('(bar nitz (quux meow)))) =
'(foo (bar nitz (quux meow)))

.. which is the desired s-expression.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Readable-discuss mailing list
Readable-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/readable-discuss

Reply via email to