> (define add
(lambda (x y)
(+ x y)))
> (add 3 "foo")
Error +: expects type <number> as 2nd argument, given: "foo"; ...
would be detected by the C++ compiler. C++ version:
int add(int a, int b) {
return a + b;
}
|