annotate Main/jungle-main/util/Either.cs @ 34:a79781723862

Add bind function to Either.cs Rewrite use bind.
author Kazuma Takeda
date Tue, 07 Feb 2017 20:50:50 +0900
parents 56de71ae6f7e
children f2ea780b3e80
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
20
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
1 
33
56de71ae6f7e Implementation of fmap.
Kazuma Takeda
parents: 20
diff changeset
2 public interface Either<A,B> {
20
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
3 A a();
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
4 bool isA();
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
5 B b();
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
6 bool isB();
34
a79781723862 Add bind function to Either.cs
Kazuma Takeda
parents: 33
diff changeset
7 Either<A, B> fmap (System.Func<B, B> f);
a79781723862 Add bind function to Either.cs
Kazuma Takeda
parents: 33
diff changeset
8 Either<A, B> bind (System.Func<B, Either<A,B>> f);
20
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
9 }