I am trying to translate some of my Haskell code into Scala and I am having difficulty with creating infix operators.
In Haskell say I have this infix operator defin
You can define implicit class
implicit class
implicit class Iff(val b: Boolean) extends AnyVal { def <=>(that: Boolean) = this.b == that }
and now you can call it without using new :
new
true <=> false // false false <=> true // false true <=> true // true