Content deleted Content added
No edit summary |
|||
Line 25:
=== Hello World ===
The following is the prototypical [["Hello,_World!"_program|Hello World]] program written in Flix:
<syntaxhighlight lang="Scala">
Line 30 ⟶ 32:
Console.printLine("Hello World")
</syntaxhighlight>
The type and effect signature of <code>main</code> specifies that it takes no arguments, returns the <code>Unit</code> value, and that the function is impure. The <code>main</code> function must be declared as impure because it invokes <code>printLine</code> which is itself marked as impure.
=== Algebraic Data Types and Pattern Matching ===
|