Вопрос

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