[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.lisp

Re: tricks that made you grin or grimace

William James

11/9/2015 12:28:00 AM

Rob Warnock wrote:

> | Have you seen any snippet of Lisp that made you do a double-take,
> | work out what's happening, and then groan or smile?
> ...
> | (defun string-repeated (string count)
> | (format nil "~v@{~A~:*}" count string))
> +---------------
>
> Hmmm...
>
> > (string-repeated "foo" 5)
>
> Error in format: No corresponding close brace.
> ~v@{~A~:*}
> ^
> [Condition of type FORMAT::FORMAT-ERROR]

MatzLisp (Ruby):

'ok' * 8
==>"okokokokokokokok"

--
Man is a social animal just like ants or bees or wolves. All have their living
space, which they defend to the very end.
http://www.kolumbus.fi/aquilon/aquilon...