Flix (programming language): Difference between revisions

Content deleted Content added
Polymorphic effects: 2x dab-needed tag
Polymorphic effects: dab-needed tag
Line 199:
</syntaxhighlight>
 
The type and effect signature can be understood as follows: The <code>&gt;&gt;</code> function takes two function arguments: <code>f</code> with effect <code>e1</code> and <code>g</code> with effect <code>e2</code>. The effect of <code>&gt;&gt;</code> is effect polymorphic in the [[conjunction]]{{dn|date=January 2021}} of <code>e1</code> and <code>e2</code>. If both are pure (their effect is true) then the overall expression is pure (true). Otherwise it is impure.
 
The type and effect system allows arbitrary boolean expressions to control the purity of function arguments.