And you can do it with a state monad in Scala too.
But Odersky's point is that (at least in Scala) it is even simpler (and thus should be preferred) to do it with raw (but still local!) mutation.
But Odersky's point is that (at least in Scala) it is even simpler (and thus should be preferred) to do it with raw (but still local!) mutation.
I'm afraid we don't have anything like ST in any Scala library that I know of :(