public static Program.Parser <C> SelectMany <A, B, C>( this Program.Parser <A> parser, Func <A, Program.Parser <B> > function, Func <A, B, C> projection) { return(parser.Bind( outer => function(outer).Bind( inner => projection(outer, inner).Unit()))); }
public static Program.Parser <B> Select <A, B>( this Program.Parser <A> parser, Func <A, B> function) { return(parser.Bind(a => function(a).Unit())); }