Content deleted Content added
Line 118:
=== Polymorphic Effects ===
The Flix type and effect systems separates pure and impure expressions. For example, the following expression is <code>Pure</code>:
<syntaxhighlight lang="Scala">
1 + 2 : Int & Pure
</syntaxhighlight>
whereas the following expression is <code>Impure</code>:
<syntaxhighlight lang="Scala">
Console.printLine("Hello World") : Unit & Impure
</syntaxhighlight>
A higher-order function can specify that a function argument ''must'' be pure. For example:
<syntaxhighlight lang="Scala">
|