Skip to content

Latest commit

 

History

History
58 lines (41 loc) · 1.08 KB

lisp0.md

File metadata and controls

58 lines (41 loc) · 1.08 KB


 home | syllabus | src | submit | chat | ©2019 by Tim Menzies

Lisp exercise 1

Zero marks tutorial

Add three numbers

sudo apt-get install clisp
chmod +x lisp0
./zero.lisp

zero.lisp:

#!/usr/bin/env clisp
;  vim: set filetype=lisp tabstop=2 shiftwidth=2 expandtab :

(defun test1()
  (let ((x 0))
    (dolist (y '(1 2 3) x)
      (setf x (+ x y)))))

  (print (test1))

Great intro Tutorial

https://learnxinyminutes.com/docs/common-lisp/

Read the above tutorial. Wr

  • atom
  • s-expression (aka list)
  • quote
  • strings
  • symbols
  • characters
  • cons
  • array
  • hash
  • lambda
  • defun
  • defmacro