flix / programming-flix

A tutorial for programming in Flix
Apache License 2.0
6 stars 13 forks source link

Rewrite `Effects`'s paragraph with impure function argument #62

Closed ninaandrup closed 2 years ago

ninaandrup commented 2 years ago

The page Effects has this paragraph which explains "A higher-order function can also require that a function is impure.". But the syntax ~> used in this example

def foreach(f: a ~> Unit, l: List[a]): Unit & Impure

is not allowed anymore. And the paragraph should be rewritten.

ninaandrup commented 2 years ago

This table also specifies that the shorthand notation a ~> b can be used instead of a -> b & Impure.

magnus-madsen commented 2 years ago

This can no longer be required and so the text should be removed :)