Files
sybil/examples/array.sy
Alek Ratzloff 76a50ce8c0 Add array example, ArrayObj implementation
* VM creates arrays using the BeginArray and EndArray instructions
* ArrayObj is implemented with a __str__ function (annoying)
* Simple example of array creation is added

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-02-17 18:53:29 -08:00

15 lines
226 B
Plaintext

# Create an array with just some numbers
{ 1 2 3 }
println!
[ :x x x ] :dup
# Call some functions
{ 1 dup! dup! }
println!
# Call your own functions, why not?
{
[ 2 *! ] :double
1 dup! double! dup! double!
}
println!