Module NonLogical.List
val map : ('a -> 'b t) -> 'a list -> 'b list tList.map f lmapsfon the elements oflin left to right order.
val map_right : ('a -> 'b t) -> 'a list -> 'b list tList.map f lmapsfon the elements oflin right to left order.
val fold_right : ('a -> 'b -> 'b t) -> 'a list -> 'b -> 'b tLike the regular
List.fold_right. The monadic effects are threaded right to left.Note: many monads behave poorly with right-to-left order. For instance a failure monad would still have to traverse the whole list in order to fail and failure needs to be propagated through the rest of the list in binds which are now spurious. It is also the worst case for substitution monads (aka free monads), exposing the quadratic behaviour.
val fold_left : ('a -> 'b -> 'a t) -> 'a -> 'b list -> 'a tLike the regular
List.fold_left. The monadic effects are threaded left to right. It is tail-recursive if the(>>=)operator calls its second argument in a tail position.
val iter : ('a -> unit t) -> 'a list -> unit tLike the regular
List.iter. The monadic effects are threaded left to right. It is tail-recurisve if the>>operator calls its second argument in a tail position.
val map_filter : ('a -> 'b option t) -> 'a list -> 'b list tLike the regular
CList.map_filter. The monadic effects are threaded left to right.