title: understanding protocol extensions in swift
body: <p>I am trying to implement a basic protocol extension like so:</p>
  
  <pre><code>protocol Value {
      func get() -&gt; Float
      mutating func set(to:Float)
  }
  extension Value {
      static func min(of a:Value, and b:Value) -&gt; Float {
          if a &lt; b { //Expression type 'Bool' is ambiguous without more context
              return a.get()
          }else{
              return b.get()
          }
      }
      static func &lt; (a:Value, b:Value) -&gt; Bool {
          return a.get() &lt; b.get()
      }
  }
  </code></pre>
  
  <p>At the <code>if</code> clause the compiler says:<code>Expression type 'Bool' is ambiguous without more context</code>. Why doesn't this work?</p>