
30 Sep
2016
30 Sep
'16
4:56 p.m.
I just tried something
evalRules :: [Rule] -> Step -> [Double]
evalRules rules step = catMaybes . takeWhile isJust . map (flip evalRule
step) $ rules
This seems to work according to my testing.
On Fri, Sep 30, 2016 at 1:32 PM, Imants Cekusins
short-circuits the computation if it hits Nothing. However, unlike the way the Maybe monad works, I want to know the partial results. could store partial results in a State monad.. Maybe would short circuit but the values would stay in the State.
would this work?
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners