update the standard library ot use lambdas

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

@ -1,10 +1,11 @@
(defun spit (def spit (lambda (cunny)
(miracle
"__builtins__" "print" (id cunny))))
(def input (lambda ()
(miracle (miracle
"__builtins__" "print" (id $1))) "__builtins__" "input" (""))))
(defun input (def thesis (lambda ()
(miracle
"__builtins__" "input" ("")))
(defun thesis
(spit (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) DEFINE:<3:(thesis)

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

Loading…
Cancel
Save