MasseGuillaume / ScalaKata

Moved
https://github.com/MasseGuillaume/ScalaKata2
121 stars 3 forks source link

Steps (equational reasoning) #49

Open MasseGuillaume opened 10 years ago

MasseGuillaume commented 10 years ago

Reduce applied expressions

steps {
  List(1, 2, 3, 4, 5).map(_+2).filter(_ % == 2)
}

step 1: List(1, 2, 3, 4, 5).map(_+2).filter(_ % == 2) step 2: List(3, 4, 5, 6, 7).filter(_ % 2 == 0) step 3: List(3, 5, 7)