scala - what is the scalaz filterM method? -
this scalaz tutorial provides example of using filterm method, not explain it. list(1, 2, 3) filterm { x => list(true, false) } res19: list[list[int]] = list(list(1, 2, 3), list(1, 2), list(1, 3), list(1), list(2, 3), list(2), list(3), list()) i see can pass boolean list of size. filterm method? also, there book/tutorial of scalaz bit more explanations? this pretty old question. i'll answer in case else wondering. you can find pretty explanation learn haskell good! . search filterm in link referenced. in book, says following (you can kind of make out haskell syntax): the filter function pretty bread of haskell programming (map being butter). takes predicate , list filter out , returns new list elements satisfy predicate kept. type this: filter :: (a -> bool) -> [a] -> [a] the predicate takes element of list , returns bool value. now, if bool value returned monadic value? whoa! is, if came context? work? instance, if every true o...