previous
|
index
|
next
Example
Suppose we define the following function on the integers:
f(x,y)
=
x/y if x>0 and y≠0
=
0 otherwise
Using just an
if
expression:
(define f (lambda (x y) (if (> x 0) (if (not (= y 0)) (/ x y) 0) 0)))
previous
|
index
|
next