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.

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top