LisL/examples

From Esolang
Jump to navigation Jump to search
This page is an orphan.

"Hello, World!" program:

(write "Hello, World!")

Truth-machine:

(set input (read))
(write input)
(if (= input "1") (
  (while opt (
    (write "1"))))
 elif (= input "0") ()
 else (
  (write "Must enter 1 or 0")))

Ackermann function:

(guide ack a (
  (args a (x y))
  (if (= x 0) (
    (+ y 1))
   elif (= y 0) (
    (ack (- x 1) 1))
   else (
    (ack (- x 1) (ack x (- y 1))))))