macros to define Haskell style monadic action blocks for IntoIterators, Reader, Writer, State, and macros for the transformers ReaderT and WriterT over Vec, LinkedList and VecDeque
usemonadic::{mdo,monad::{Bind, Monad}};usenum::Integer;fnmain(){let xs =mdo!{&x <-&vec![1,2,3,4];// with item ref pattern (&x) in the lambda argument position
guard x.is_odd();let z = x +1;pure(x, z)}.collect::<Vec<_>>();println!("result: {:?}", xs);}