Quoth Donn Cave <[email protected]>,
...
> I think it's very likely there's a simpler way to do this with
> Data.Serial as written, I am just a little backwards with state
> monads and that kind of thing.

OK, another look at it reveals that "mplus" can be used for this
application, so much more simply,

    import Control.Monad (mplus)

    getx = do
        a <- get
        x <- getn `mplus` return []
        return (a:x)




        Donn Cave, [email protected]
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to