/** * Maps the given function across the list of results and returns a list * consisting of the flattened contents of all the generated lists of * results. * * @param f the function to map across the list of results. */ internal List MapAppend(IComputationFactory f) { var result = new ArrayList(); foreach (var o in list) { var ri = (List)f.Make(o).Apply(); result.AddRange(ri.list); } return new List(result); }
/** * Maps the given function across the list of results and returns a list * consisting of the flattened contents of all the generated lists of * results. * * @param f the function to map across the list of results. */ internal List MapAppend(IComputationFactory f) { var result = new ArrayList(); foreach (var o in list) { var ri = (List)f.Make(o).Apply(); result.AddRange(ri.list); } return(new List(result)); }
/** * Produces a <i>bind</i> (<code>>>=</code>) computation with the * given initial computation and function to produce the subsequent * computation. * * @param c the initial computation. * @param f the function to produce the subsequent computation. * @return a bind computation. */ public abstract Computation Bind(Computation c, IComputationFactory f);
public override Computation Bind(Computation m, IComputationFactory f) { return new Bind(m, f); }
/** * Produces a <i>bind</i> (<code>>>=</code>) computation with the * given initial computation and function to produce the subsequent * computation. * * @param c the initial computation. * @param f the function to produce the subsequent computation. * @return a bind computation. */ public abstract Computation Bind(Computation c, IComputationFactory f);
/** * Constructs a bind computation with the given sub-computation and * function to produce the next sub-computation. * * @param m the first sub-computation. * @param f the function to produce the second sub-computation. */ public Bind(Computation c, IComputationFactory f) { this.c = c; this.f = f; }
/** * Constructs a bind computation with the given sub-computation and * function to produce the next sub-computation. * * @param m the first sub-computation. * @param f the function to produce the second sub-computation. */ public Bind(Computation c, IComputationFactory f) { this.c = c; this.f = f; }
public override Computation Bind(Computation c, IComputationFactory f) { return(new Bind <T>(c, f)); }
public override Computation Bind(Computation m, IComputationFactory f) { return(new Bind(m, f)); }