Traversing Scheme function as a list

Posted by csl on Stack Overflow See other posts from Stack Overflow or by csl
Published on 2010-03-06T17:59:31Z Indexed on 2010/03/12 1:17 UTC
Read the original article Hit count: 504

Isn't it possible to treat functions in Scheme as any other list?

Basically, what I want do to is something like this:

(define (foo) "hello")

(cdr foo)  ; or similar, should return the list ((foo) "hello")

I've found a similar discussion about this, and I feel a bit disappointed if this is not possible with Scheme. If so, why is this impossible? Is it possible in other lisps?

EDIT: Changed (cdr 'foo) to (cdr foo) -- it was misleading. I'm asking, why can't I access a function as a list?

© Stack Overflow or respective owner

Related posts about Scheme

Related posts about lisp