Summary Files Commits Branches @commit @diff @stats
path: root / Year 2 / Implementation of Programming Languages / Homework 02 / example.lisp
blob: cd7a5773eaeafb9f555f629394f1ff75f1e40986 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
(defvar *NAME* "John")
(defvar *AGE* 23)
(defvar *ABOUT* " T NIL cond decf block")

;;; This is a stupid funciton
(defun adult? ()
  (>= *AGE* 18))

(defun will-I-graduate? ()
  NIL)

(defun distance (p1 p2)
  (sqrt (* p1 p1) (* p2 p2)))

(defun bar (a b)
  (if (and (> b a) (<= 10 b))
    (format t "Valid")
    (format t "Invalid")))

(defun foo (&key ((:apple a)) ((:box b) 0) ((:charlie c) 0 c-supplied-p))
  (list a b c c-supplied-p))