|
KernelSlanders posted:+ isn't really an operator in scala, just an infix notation method call. (_+_) is syntactic sugar for (a, b) => a.+(b) Also for what it's worth, Scala doesn't have a specific class of operators. Any method which takes a single argument can be called as an infix operator. Generally names are chosen so that they flow like a sentence. Function1 has a method called 'andThen' which takes a second Function1 and returns another Function1 which is the first andThen the second. PartialFunction's orElse calls an alternative PartialFunction if the first doesn't apply.
|
# ¿ Apr 2, 2015 13:09 |
|
|
# ¿ May 11, 2024 19:30 |