Applying multiple lists?
Posted: Sat Mar 12, 2011 12:54 am
Hi there,
Having a brain-fart, I blame it on dropping my morning coffee by accident before finishing it.
I have a list with multiple lists inside, and I'd like to map a function to each list as if I were passing them separately to map.
Example:
(map append '("one" "two") '("for" "you")) will render ("onefor" "twoyou").
I'd like to accomplish that, but if the argument to map is one list, with multiple lists. Sort of like this psuedo-code:
(map append (map each mylist))
Of course I could write a primitive function called "each" that did nothing but return a single element, but I figured that would be taking the long road since I'm sure newLisp has something built in I'm missing.
Thanks in advance!
Having a brain-fart, I blame it on dropping my morning coffee by accident before finishing it.
I have a list with multiple lists inside, and I'd like to map a function to each list as if I were passing them separately to map.
Example:
(map append '("one" "two") '("for" "you")) will render ("onefor" "twoyou").
I'd like to accomplish that, but if the argument to map is one list, with multiple lists. Sort of like this psuedo-code:
(map append (map each mylist))
Of course I could write a primitive function called "each" that did nothing but return a single element, but I figured that would be taking the long road since I'm sure newLisp has something built in I'm missing.
Thanks in advance!