| bio | website | marxidad.com |
|---|---|---|
| location | Toronto, Canada | |
| age | 36 | |
| visits | member for | 2 years, 3 months |
| seen | Mar 7 '11 at 22:06 | |
| stats | profile views | 1 |
http://www.marxidad.com/Aboutme
I first learned BASIC at age 11 on a Commodore 64.
Former SDET, ADO.NET Team @ Microsoft.
class Maybe<T>
{ T t;
Maybe(){}
public static Maybe<T> Just(T t){ return new Maybe<T>{t=t};}
static Maybe<T> nothing = new Maybe<T>();
public static Maybe<T> Nothing
{ get {return nothing;}
}
public Maybe<U> Select<U>(Func<T,U> f)
{ return Maybe<U>.Just(f(t));
}
public Maybe<V> SelectMany<U,V>(Func<T, Maybe<U>> f, Func<U,V> g)
{ var x = f(t);
if (x == Maybe<U>.Nothing) return Maybe<V>.Nothing;
return Maybe<V>.Just(g(x.t));
}
}
This user has not asked any questions
|
|
Stack Overflow | 45,559 rep | 11119166 |
|
|
Meta Stack Overflow | 571 rep | 514 |
|
|
Programmers | 261 rep | 14 |
|
|
Webmasters | 236 rep | 13 |
|
|
Super User | 156 rep | 511 |
This user has no active bounties
0 Votes Cast
This user has not cast any votes