Scheme中的scheme lambda表达式

时间:2013-05-15 17:44:17

标签: scheme

有人可以帮助解释原因吗

(define gg (lambda (ff x) (ff x x x))

拥有所有这些属性?感谢

gg requires two arguments when called
gg's first argument should be a function
gg's first argument should be a function that accepts 3 arguments

1 个答案:

答案 0 :(得分:5)

  1. gg是一个有两个参数的lambda ffx
  2. ff用于lambda中的(ff x x x)表达式,因此ff应该是可调用的。
  3. 表达式(ff x x x)有三个参数,因此ff应该是一个带三个参数的函数。