(define (twoofthree x y z) (>= (+ x y z) 2))(twoofthree 0 0 1)
(twoofthree 1 1 1)
(twoofthree 1 0 0)
(twoofthree 1 0 0)
本文提供了一个使用Scheme语言定义函数的简单示例。该函数名为twoofthree,接受三个参数x、y、z,并判断这三个参数中是否至少有两个大于等于1。通过几个具体的测试用例展示了函数的应用。
(define (twoofthree x y z) (>= (+ x y z) 2))
被折叠的 条评论
为什么被折叠?