infix-operator

Scala match decomposition on infix operator

I'm trying to understand the implementation of Lists in Scala. In particular I'm trying to get my head around how you can write match expressions using an infix operator, for example: a match { case Nil => "An empty list" case x :: Nil => "A list without a tail" case x :: xs => "A list with a tail" } How is the match expression ...

Is it possible to use the pipeline operator to call a method on a returned object?

Is it possible to call a method on a returned object using the pipeline infix operator? Example, I have a .Net class (Class1) with a method (Method1). I can currently code it like this: let myclass = new Class1() let val = myclass.Method1() I know I could also code it as such let val = new Class1().Method1() However I would like t...