QUESTION: get-keyword

From: Andrew Joseph Kompanek <ak10+_at_andrew.cmu.edu>
Date: Mon, 10 Apr 1995 20:34:10 -0400 (EDT)

I'm not sure whether this falls under the heading of STk specific or
a general scheme question.

To do a simple linear lookup I want to convert a string to a keyword
symbol... but I can't figure out how to do this.

The most straight-forward approach:

      (get-keyword (string->symbol ":foo") '(:foo 7))

generates the error:

*** Error:
get-keyword: bad keyword: foo

I thought that this might be because get-keyword is implemented as
a macro, so I tried:

 (eval `(get-keyword ,(string->symbol ":foo") '(:foo 7)))

which yields:

*** Error:
unbound variable: :foo

which (I think) means that that the symbol :foo _IS_ evaluated.

Any insight into what's happening here would be really appreciated.

Thanks!
Drew
Received on Tue Apr 11 1995 - 02:36:24 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST