May. 27th, 2012
val appender = (s1: String) => (s2: String) => s1 + " " + s2
"ApplicativeSet" should {
"combine Johns and Pauls" in {
import All.AppSet._
val combinations = pure(appender) <*> Set("John", "Paul") <*> Set("the 1st", "the 2nd")
combinations equals Set("John the 1st", "John the 2nd", "Paul the 1st", "Paul the 2nd") mustBe true
}
}
