initial project setup

This commit is contained in:
2021-02-09 13:53:35 +01:00
commit d64570bf21
12 changed files with 2152 additions and 0 deletions

3
tmp/data.csv Normal file
View File

@@ -0,0 +1,3 @@
Ticker,Price
FDX,257.3
C,59.85
1 Ticker Price
2 FDX 257.3
3 C 59.85

36
tmp/example.lisp Normal file
View File

@@ -0,0 +1,36 @@
; quicksort
(defun qs (l)
(if (<= (len l) 1)
l
(do
(define pivot (first l))
(+
(qs (filter (lambda (n) (> pivot n)) l))
(list pivot)
(qs (tail (filter (lambda (n) (<= pivot n)) l)))
))
))
; decrement a number
(defun dec (n) (- n 1))
; increment a number
(defun inc (n) (+ n 1))
; not a bool
(defun not (x) (if x 0 1))
; negate a number
(defun neg (n) (- 0 n))
; is a number positive?
(defun is-pos? (n) (> n 0))
; is a number negative?
(defun is-neg? (n) (< n 0))
; define a function `fact` that takes an argument `n`
(defun fact (n)
(if (<= n 1)
1
(* n (fact (- n 1)))
))
(print "example.lisp loaded")