April 2, 2012
Currying in the presence of mutable parameters
In the language introduced yesterday, mutable parameters play the important role of representing the side effects of actions in the type system and thus ensure referential transparency.
One of the questions currently unaddressed is how to handle currying in the presence of mutable parameters. In order to visualise this problem, consider a function
printLn(mutable IO, String line) If we bind the the first parameter, what should be the type of the function, and especially important how do we get back the mutable parameter?
...
Read more 》