Summary Files Commits Branches @commit @diff @stats
path: root / Year 2 / Implementation of Programming Languages / Homework 01 / example.lisp
diff options
context:
space:
mode:
Commiteed80989c03e8852e03042a61112c2d3b7662f0f (patch)
Author
 Syndamia <kamen@syndamia.com>
2022-10-25 21:34:31 +0300
Committer
 Syndamia <kamen@syndamia.com>
2022-10-25 21:34:31 +0300
Filesf6249bd1c2741dc512fe6216295b47ca57030f9c /Year 2/Implementation of Programming Languages/Homework 01/example.lisp
uni-projects-eed80989c03e8852e03042a61112c2d3b7662f0f.tar
uni-projects-eed80989c03e8852e03042a61112c2d3b7662f0f.tar.gz
uni-projects-eed80989c03e8852e03042a61112c2d3b7662f0f.zip
Parentac8f5cfaa7a1752e7ba0e62aa40d4bc785e5be34 (diff)
[IPL/H01] Added initial implementation
1 files changed, 21 insertions, 0 deletions
-rw-r--r--Year 2/Implementation of Programming Languages/Homework 01/example.lisp21
diff --git a/Year 2/Implementation of Programming Languages/Homework 01/example.lisp b/Year 2/Implementation of Programming Languages/Homework 01/example.lisp
new file mode 100644
index 0000000..cd7a577
--- /dev/null
+++ b/Year 2/Implementation of Programming Languages/Homework 01/example.lisp
@@ -0,0 +1,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))