Skip to content
This repository was archived by the owner on Jul 9, 2022. It is now read-only.

Examples

LyricLy edited this page Jul 18, 2017 · 1 revision

These are some examples of Ly programs. This page will be filled out more as time goes by.

Hello World (commented):

"Hello, World!"  # push "Hello, World!" to the stack as the letter's ASCII representations
r # reverse the stack, since it will be in the wrong order to print
[o] # pop values off the stack and print them, until the stack is empty

Prime number checker:

n:s[:2-![1u;]p1-:lf%![0u;]p]

Cat program:

i[oi]

Reverse cat program:

i[i]p[o]

Clone this wiki locally