3 ms·
There was a time when I would have wanted this - I was a python guy for years. But I've found I can be just as dynamic in scala (perhaps even more so, given imp
by lmm 13y ago
There was a time when I would have wanted this - I was a python guy for years. But I've found I can be just as dynamic in scala (perhaps even more so, given implicits), without having to give up type safety. E.g. his example looks almost identical in scala:
List("Rob", "Christopher", "Joe", "John").filter{
_.size <= 4
}.foreach {
println _
}
- cryptos 13y agoOr even more concise: List("Rob", "Christopher", "Joe", "John").filter(_.size < 5).foreach(println)