This is probably a simple thing I'm missing, but I'm trying to get the cdr
of a pair and every call to say (cdr (cons 'a '5))
comes back as (5)
. I sort of get why that is, but how can I get the it to return without the parens?
I don't want to use flatten
because what I'm trying to get (i.e. the cdr) might itself be another procedure expression already wrapped in parens, so I don't want to flatten the list.
(If it matters, I'm working on transforming a let
expression into a lambda
expression, and this is one of the steps I'm taking, trying to break apart the lambda bindings so I can move them around).