Thanks for explanation. One more question: are there any materials except LogicT.pdf from link on the logict hackage entry? I'd like to read something on this interesting topic because the above code looks kinda obfuscated to me :)