@drewhk: Patrik’s approach is what I meant and it also matches what you want.

@patriknw: that’s the reason why we don’t use Haskell ;-) (Scala has vars)