Quickstart

Overview for programmers.

# Each scope has a list of strings.
10 "String" 20
'String 30 file.oto
# List is: "10", "String", "20", "String", "30", "file.oto"
clear
# List is empty.
# Sub-scopes start with empty lists.
( (10) + (10) )
# List is 20

# Conditionals
is 20 then (
    print "Truthy"
) else (
    print "Falsy"
)

# Loops
loop (
    # Break the first loop in the call stack.
    1 then exit
)
while running (
    void = running # Break
)

# The list is assigned to variables.
1 = one
# List is empty.
just "A string" = content
content
# "A string"

# Iteration
0 = sum
1 to 10 each ( = number
    print number
    sum + number = sum
)

# Functions
one: 1
kitty-says (sentence): ( = list
    print ("Meow" sentence)
    print ("list was: " list)
)
5 kitty-says one
# Meow 1
# list was: 5

# Callable parameter
do-twice (body!) (
    body body
)
do-twice (print "message")
# message
# message

# Complex data structures
entry 'type 'utility
entry 'size 3
entry 'description ("A hammer" "pretty heavy")
= item
the item 'size
# 3
clear
# Lists
add-item item
add-item item = list
the (list item-at 1) 'type
# "utility"

# Multiple files
use utils.oto
from math.oto ('root 'fibonacci)