【发布时间】:2014-02-06 06:55:00
【问题描述】:
嘿,我在考虑这个问题时遇到了麻烦,需要一些帮助。
在Scheme中,如果我得到一个函数列表(list square - double),我需要创建一个包含该列表的函数
例如
(let (f (co (list square - double)))) where co is the function name that combines
和
一样(square (- (double n))) where n is some number
So you can do the following
(f 2) => (16)
(define (co functions) (lambda (n) (? functions)))
我不知道从哪里去?。我知道如果你映射它,你最终会得到应用于数字的函数,但输出为一个列表,所以它会是 '(4 -2 4)。
任何想法将不胜感激
【问题讨论】:
标签: list function lambda scheme