Mercurial > hg > Database > jungle-sharp
diff Main/jungle-main/util/Either.cs @ 33:56de71ae6f7e
Implementation of fmap.
author | Kazuma Takeda |
---|---|
date | Sat, 28 Jan 2017 19:12:18 +0900 |
parents | 1f99e150f336 |
children | a79781723862 |
line wrap: on
line diff
--- a/Main/jungle-main/util/Either.cs Fri Jan 20 07:43:43 2017 +0900 +++ b/Main/jungle-main/util/Either.cs Sat Jan 28 19:12:18 2017 +0900 @@ -1,7 +1,8 @@ -public interface Either<A,B> { +public interface Either<A,B> { A a(); bool isA(); B b(); bool isB(); + Either<A, B> fmap (System.Func<B, B> f, Either<A, B> e); }