Esempio n. 1
0
 public FuncyListTC <TReturn> Apply <TReturn>(FuncyListTC <Func <T, TReturn> > f)
 {
     if (f.IsCons)
     {
         return(FuncyListTC.Construct(f.SelectMany(fCons => this.FMap(fCons)).ToArray()));
     }
     else
     {
         return(FuncyListTC.Nil <TReturn>());
     }
 }
Esempio n. 2
0
 public FuncyListTC <TReturn> ApplyRight <TReturn>(FuncyListTC <TReturn> other)
 {
     return(other);
 }
Esempio n. 3
0
 public FuncyListTC <T> ApplyLeft <TReturn>(FuncyListTC <TReturn> other)
 {
     return(this);
 }
Esempio n. 4
0
 public override FuncyListTC <TReturn> ComputeWith <TReturn>(Func <T, FuncyListTC <TReturn> > f)
 {
     return(FuncyListTC.Nil <TReturn>());
 }
Esempio n. 5
0
 public override FuncyListTC <TReturn> FMap <TReturn>(Func <T, TReturn> f)
 {
     return(FuncyListTC.Nil <TReturn>());
 }
Esempio n. 6
0
 public override FuncyListTC <TReturn> ComputeWith <TReturn>(Func <T, FuncyListTC <TReturn> > f)
 {
     return(FuncyListTC.Construct(this.SelectMany(h => f(h)).ToArray()));
 }
Esempio n. 7
0
 public override FuncyListTC <TReturn> FMap <TReturn>(Func <T, TReturn> f)
 {
     return(FuncyListTC.Cons(f(this.Head), this.Tail.FMap(f)));
 }
Esempio n. 8
0
 public ConsTC(T head, FuncyListTC <T> tail)
 {
     this.Head = head;
     this.Tail = tail;
 }