[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

map 1:2



I want to write a function that will create a list with two items for
every 1 item in another list. I am currently using map to create a 1:1
list like so

`(ul
   ,@(map
       (lambda (x)
        `(li x))
       '("one", "two","three"))) =>
'(ul
   (li "one")
   (li "two")
   (li "three"))

but i want it to have two items foreach one like this

'(dl
   (dt "one")
   (dd "ONE")
   (dt "two")
   (dd "TWO")
   (dt "three")
   (dd "THREE"))

anyone know how i can do that with a map or will i need to write a new map
that does what i want?

-mike