Monads.FilterMonadA module providing monadic operations for a custom filter_wrapper type.
val return : 'a -> 'a filter_wrapperreturn x wraps a value x into a filter_wrapper.
val get : 'a filter_wrapper -> 'aget fw extracts the value from the filter_wrapper.
val bind :
'a filter_wrapper ->
bool ->
('a -> 'a filter_wrapper) ->
'a filter_wrapperbind fw cond f applies the function f to the value inside fw if cond is true, otherwise returns the original fw.
val (>>=) :
'a filter_wrapper filter_wrapper ->
(bool * ('a -> 'a filter_wrapper)) ->
'a filter_wrapper filter_wrapperInfix operator for bind. Equivalent to bind fw cond f.
fold_left f acc lst folds over the list lst using the function f and an accumulator acc.
map f lst applies the function f to each element of the list lst.
filter_map f lst applies the function f to each element of the list lst, where f returns an option. Only the Some values are included in the result.