Files
sybil/examples/array.sy
2022-02-18 17:47:40 -08:00

23 lines
307 B
Plaintext

# Create an array with just some numbers
{ 1 2 3 }
println!
[ :x x x ] :dup
# Call some functions
{ 1 dup! dup! }
println!
# Internal function definitions are allowed too
{
[ 2 *! ] :double
1 dup! double! dup! double!
}
println!
# 2-D arrays
{
{ 1 0 0 }
{ 0 1 0 }
{ 0 0 1 }
}
println!