diff --git a/lib/kokoro.klambda b/lib/kokoro.klambda index 5e1efa9..40c0d6d 100644 --- a/lib/kokoro.klambda +++ b/lib/kokoro.klambda @@ -1,11 +1,19 @@ +INCLUDE:./loop.klambda + +(def spit-raw (lambda (cunny) + (w "/dev/fd/1" cunny))) + (def spit (lambda (cunny) - (miracle - "__import__('builtins')" "print" (id cunny)))) + (spit-raw (+ (conv string cunny) "\n")))) + +(def prettyspit-lst (lambda (lst-cunny) + (each lst-cunny + (id spit-raw (+ (conv string item) " "))))) (def input (lambda () - (miracle - "__import__('builtins')" "input" ("")))) + (r "/dev/fd/0" 20))) + (def thesis (lambda () (spit - ("this language belongs to makise kurisu. there are many like it, but this one is hers.")))) -DEFINE:<3:(thesis) \ No newline at end of file + "this language belongs to makise kurisu. there are many like it, but this one is hers."))) +(def <3 thesis) \ No newline at end of file diff --git a/test.klambda b/test.klambda index 0ac3b16..629dd37 100644 --- a/test.klambda +++ b/test.klambda @@ -1,12 +1,12 @@ INCLUDE:./lib/aids.klambda (def a (id (id "desu"))) -(spit +(prettyspit-lst ("lol swej" (+ 9000 1) a)) (spit (cond (= "10" (+ 1 9)) "same" "not same")) (cond ("", (+ 0 1)) - (id spit "one") - (id spit "zero")) + (spit "one") + (spit "zero")) (spit "how old are you? > ") (def age (conv number (input)))