update the standard library ot use lambdas

master
cynic 3 years ago
parent 2ee4ceefe6
commit e56ffc38aa
  1. 13
      lib/kokoro.klambda
  2. 8
      lib/lists.klambda

@ -1,10 +1,11 @@
(defun spit
(def spit (lambda (cunny)
(miracle
"__builtins__" "print" (id $1)))
(defun input
"__builtins__" "print" (id cunny))))
(def input (lambda ()
(miracle
"__builtins__" "input" ("")))
(defun thesis
"__builtins__" "input" (""))))
(def thesis (lambda ()
(spit
("this language belongs to makise kurisu. there are many like it, but this one is hers.")))
("this language belongs to makise kurisu. there are many like it, but this one is hers."))))
DEFINE:<3:(thesis)

@ -1,6 +1,6 @@
(defun length
(def length (lambda (cunny)
(miracle
"__builtins__" "len" ((id $1))))
"__builtins__" "len" (cunny))))
(defun append
(insert (length $2) $1 $2))
(def append (lambda (item, victim)
(insert (length victim) item victim)))

Loading…
Cancel
Save