Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun gray (a b c d)
- (setf res ())
- (if (= a 1)
- (setf res (cons res (cons '1 ())))
- (setf res (cons res (cons '0 ()))))
- (if (or (and (eq a 0) (eq b 1)) (and (eq a 1) (eq b 0)))
- (setf res (cons res (cons '1 ())))
- (setf res (cons res (cons '0 ()))))
- (if (or (and (eq b 0) (eq c 1)) (and (eq b 1) (eq c 0)))
- (setf res (cons res (cons '1 ())))
- (setf res (cons res (cons '0 ()))))
- (if (or (and (eq c 0) (eq d 1)) (and (eq c 1) (eq d 0)))
- (setf res (cons res (cons '1 ())))
- (setf res (cons res (cons '0 ()))))
- (print (cdaaar res))
- (print (cdaar res))
- (print (cdar res))
- (print (cdr res))
- )
- (gray (read) (read) (read) (read))
Add Comment
Please, Sign In to add comment