Given two lists, what's the easiest way to splice them together.
From this:
(set 'a '(fred jim bob))
(set 'b '(1 2 3))
to this
((fred 1) (jim 2) (bob 3))
... coming back to some newLISP coding after a few weeks away and I think I'm rusty...
This does the trick:
(map list a b)
I'm sure there's an even better way, though.
m i c h a e l
Thanks! I've forgotten more than I thought! :)
Another solution:
(transpose (list a b))
>((fred 1) (jim 2) (bob 3))
and applying transpose again has the effect of undoing:
(transpose (transpose (list a b)))
>((fred jim bob) (1 2 3))
like it!
I use this function
(define (merge)(transpose (args)))
Lutz is a man of few words ...