org.specs2.control.origami.Fold
See theFold companion trait
Attributes
-
Companion
-
trait
-
Graph
-
-
Supertypes
-
class Object
trait Matchable
class Any
-
Self type
-
Members list
Applicative instance
This means that we can write:
val mean: Fold[Int, Int] = (sum |@| count)(_ / _)
An Applicative instance is also a Functor instance so we can write:
val meanTimes2 = mean.map(_ * 2)
Attributes