Question

I don't know really how exactly should the List transformer ListT be used. For example how should this simple task be done:

backtrack :: ListT IO ()
backtrack = do
    x <- lift getLine
    a <- x
    lift $ print a

And what should be the type of the function ?

This is not a task I'm trying to accomplish (I know how to solve this issue using many other methods), I just want to know how to use ListT to accomplish such tasks.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top