How to extract values from symbols in a list?

Started by jopython, May 20, 2013, 06:09:44 AM

Previous topic - Next topic

jopython

I have a list of symbols in a list named 'mems'

How do i extract the "values" of those symbols instead of the symbols themselves?





: mems
(s1 s2 s3 s4 s5)

: s1
("hi")

: (map symbol? mems)
(true true true true true)


jopython

#1
never mind:



I figured it is

(map eval mems)

rickyboy

#2
That's great.  I sometimes have to ask someone about a problem I'm stuck on, and then in the asking, I figure out myself what the problem is.  I think that often the only thing we need is a sounding board.  Excellent.



BTW, this too might work: (eval (cons 'list mems))
(λx. x x) (λx. x x)

Lutz

#3
and this too: (eval (cons list mems)) w/o the quote ;)

jopython

#4
Thank you for the quick responses. Love you people.