title: Scala - Prefix Unary Operators
body: <p>I've recently given Scala a second chance, and started with the project I always implement (in functional or pseudo-functional languages): an automated reasoner for propositional logic (and later predicate logic).</p>
  
  <p>Now, I've tried to get the notation of propositional logic in the language itself as pretty as possible, and I've gotten this far - with an implicit conversion (String -> Atom):</p>
  
  <pre><code>("A" and "B") implies "C"
  </code></pre>
  
  <p>The functions "and" and "implies" (and "or" and "equivalent") are simple methods that call the relevant case class constructor. However, when implementing "not", I get stuck with either of the two following notations:</p>
  
  <pre><code>("A" and "B").not
  Not("A" and "B")
  </code></pre>
  
  <p>Is there a way to trick Scala into accepting the desired:</p>
  
  <pre><code>not("A" and "B")
  </code></pre>
  
  <p>Preferrably without renaming the class "Not" to "not", because I might like to call it "¬" or something else, in th future.</p>