Summary Files Commits Branches @commit @diff @stats
path: root / Year 2 / Implementation of Programming Languages / Homework 02 / example.lisp
diff options
context:
space:
mode:
Commit7c8f2a8aa04603d5bc83441353184589640e8c41 (patch)
Author
 Syndamia <kamen@syndamia.com>
2022-11-08 19:45:50 +0200
Committer
 Syndamia <kamen@syndamia.com>
2022-11-08 19:45:50 +0200
Files7443dae4cc342e194c486aa964f3e15e18ae3265 /Year 2/Implementation of Programming Languages/Homework 02/example.lisp
uni-projects-7c8f2a8aa04603d5bc83441353184589640e8c41.tar
uni-projects-7c8f2a8aa04603d5bc83441353184589640e8c41.tar.gz
uni-projects-7c8f2a8aa04603d5bc83441353184589640e8c41.zip
Parentd462bad3f4ed30d2c9e4562968a0b8a2ad9e3db7 (diff)
[IPL/HW02] Copied work from HW01, added a help message to lexer.sh, added left margin to pre tag
1 files changed, 21 insertions, 0 deletions
-rw-r--r--Year 2/Implementation of Programming Languages/Homework 02/example.lisp21
diff --git a/Year 2/Implementation of Programming Languages/Homework 02/example.lisp b/Year 2/Implementation of Programming Languages/Homework 02/example.lisp
new file mode 100644
index 0000000..cd7a577
--- /dev/null
+++ b/Year 2/Implementation of Programming Languages/Homework 02/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))