Content deleted Content added
Narky Blert (talk | contribs) →Polymorphic effects: 2x dab-needed tag |
Narky Blert (talk | contribs) →Polymorphic effects: dab-needed tag |
||
Line 199:
</syntaxhighlight>
The type and effect signature can be understood as follows: The <code>>></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>>></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.
|