Function definition: Difference between revisions
Content added Content deleted
(PascalABC.NET) |
Langurmonkey (talk | contribs) |
||
Line 2,223: | Line 2,223: | ||
map times3, [1, 2, 3]</syntaxhighlight> |
map times3, [1, 2, 3]</syntaxhighlight> |
||
=== impure |
=== impure effects === |
||
Functions with impure effects must be declared as such, using fn*. |
|||
< |
<syntaxhighlight> |
||
val writeit = fn*(x) { writeln x } |
|||
</syntaxhighlight> |
|||
Impure functions cannot be passed to pure functions. |
Impure functions cannot be passed to pure functions. |