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
trait CanBoost[S, D] extends D => D => State[S, Unit] | |
def boost[S, D](from: D, to: D)(implicit run: CanBoost[S, D]): State[S, Unit] = | |
run(from)(to) | |
trait GetValueFunc[S, D, V] extends D => State[S, Option[ValueFunc[V]]] | |
def invalues[S, D, V](d: D) | |
(implicit getValueFunc: GetValueFunc[S, D, V], | |
officialPartner: GetOfficialPartner[S, D], |
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
/* | |
* Benchmarks of answers posted to http://stackoverflow.com/questions/23914713 | |
* "How do you stop building an Option[Collection] upon reaching the first None?" | |
* | |
* Results: | |
* | |
* version ms per iteration | |
* ------- ---------------- | |
* allPartsIterator: 0.001022 | |
* allPartsMatchReturn: 0.001544 |