[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.lisp

Re: simple testcase to dissect

William James

8/30/2015 5:36:00 PM

Peter Lewerin wrote:

> > (defun proc (list)
> > (apply #'append
> > (loop for elem in list
> > collect (gethash elem rule-table))))
>
> The apply/append wrapper isn't strictly necessary here; the loop can
> instead be written as:
>
> (defun proc (list)
> (loop for elem in list
> append (gethash elem rule-table)))
>
> This is more readable, but actually a bit slower and conses more.

Gauche Scheme:

(define (proc keys)
(append-map (pa$ hash-table-get rule-table) keys))

--
The Ortagard school in Rosengard, an area of Malmo with close to 100% Muslim
immigrants, is burning yet again. Several police patrols are called out. But
Prime Minister Persson has already been escorted by special security police
into his bulletproof Volvo....
fjordman.blogspot.ca/2005/05/is-swedish-democracy-collapsing.html