trying to make a scheme procedure
Posted
by
asfejaeofijfe
on Stack Overflow
See other posts from Stack Overflow
or by asfejaeofijfe
Published on 2011-03-20T16:08:41Z
Indexed on
2011/03/20
16:10 UTC
Read the original article
Hit count: 189
trying to make a scheme procedure called make-odd-mapper! its supposed to be a procedure that takes one input, a procedure, and produces a procedure as an output
ex:
(define i4 (mlist 10 2 30 4))
(i4)
{10 2 30 4}
((make-odd-mapper! add-one) i4)
i4
{11 2 31 4}
I know the problem needs to mutate the input list and that set-mcar! and void are apart of it......could anyone give me some reasonable lines of code to solve this? It would be useful in case anyone was wondering about mutation.....and using it to create a procedure that makes a procedure as its output....
© Stack Overflow or respective owner