Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;9. Переписать функцию how-alike, приведенную в лекции и использующую COND, используя конструкции IF, AND/OR.
- (defun how_alike(x y)
- (if (or (= x y) (equal x y))
- 'the_same
- (if (and (oddp x) (oddp y))
- 'both_odd
- (if (and (evenp x) (evenp y))
- 'both_even
- 'difference
- )
- )
- )
- )
- (how_alike 4 4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement