| ||||||||
| ||||||||
| Description | ||||||||
A monad transformer for the creation of Lists. Similar to Python's generators. import Data.List.Class (convList)
hanoi 0 _ _ _ = mempty
hanoi n from to other =
generate $ do
yields $ hanoi (n-1) from other to
yield (from, to)
yields $ hanoi (n-1) other to from
> convList (hanoi 3 'A' 'B' 'C') :: [(Char, Char)]
[('A','B'),('A','C'),('B','C'),('A','B'),('C','A'),('C','B'),('A','B')]
| ||||||||
| Synopsis | ||||||||
| ||||||||
| Documentation | ||||||||
| ||||||||
| ||||||||
| ||||||||
| O(1), Transform a GeneratorT to a DListT | ||||||||
| ||||||||
| O(1), Output a result value | ||||||||
| ||||||||
| O(1), Output all the values of a DListT. | ||||||||
| Produced by Haddock version 2.4.2 |