문제

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