Basic Syntax

Hello world

with console from std:io
console.out("Hello world")

Pipelines

with list fixed from std:collections
with console from std:io

var fruits = list.of({"Apple", "Banana", "Mango", "Kiwi", "Avocado"})

fruits
|> map(??, {x => x.toLower()})
|> filter({x => x.startsWith("a")})
//if ?? is not in the parameters, the method is inserted as the first parameter
|> forEach(??, {x => console.out(x)})

Function guards

with console fixed from std:io

func myFunction(a int) requires a < 10
    console.out("a is smaller than 10")
end

func myFunction(a int) requires a > 10
    console.out("a is greater than 10")
end

myFunction(5) // a is smaller than 10
myFunction(17) // a is greater than 10

Actors

Fibonacci sequence

Last updated