This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am ilcavero on github. | |
* I am ilcavero (https://keybase.io/ilcavero) on keybase. | |
* I have a public key whose fingerprint is 4A8B 72C8 E22E 06EC 2C29 60FF 14F3 DD51 EA12 2782 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sealed abstract class Determine[+A] { | |
def map[B](f: A => B): Determine[B] | |
def flatMap[B](f: A => Determine[B]): Determine[B] | |
def filter(p: A => Boolean): Determine[A] | |
def foreach(b: A => Unit): Unit | |
} | |
final case class Known[+A](value: A) extends Determine[A] { | |
def map[B](f: A => B): Determine[B] = Known(f(value)) | |
def flatMap[B](f: A => Determine[B]): Determine[B] = f(value) |