Cheers, Rein. This is new for me. I tried to make it work. BTW the monad instance is not used. Commenting it out has no effect on running main. How can I apply Val (not IO) Monad instance in this example? Could you suggest a simple change?