We can now see the famous Hello World program in
def main(): Unit \ IO = println("Hello World!")
You will immediately notice a few things are different from other programming languages:
mainfunction has no formal parameters, in particular it does not take an arguments array. Instead the command line arguments are available by calling the
- The return type of the
mainfunction has the
IOeffect since it prints to the terminal.