Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: simple testcase to dissect

7 views
Skip to first unread message

WJ

unread,
Feb 28, 2015, 1:51:47 AM2/28/15
to
> > (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 list)
(append-map
(cut hash-table-get rule-table <>)
list))
0 new messages