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...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: tricks that made you grin or grimace
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password