title: How does the "=>" operator work in scala in this case?
body: <p>I am currently doing an assignment for a course I try to complete.</p>
  
  <p>In the assignment something like this is defined:</p>
  
  <pre><code>type Spec = Term=&gt; Term
  </code></pre>
  
  <p>In this case a "Term" is a block of program code.</p>
  
  <p>Now I understand this means I have a Spec in which a Term implies another Term, or resolves to it. Sorry for my bad wording here, english is not my first language.</p>
  
  <pre><code>def svc(ctxt: Env)(pre: Spec, s: Stmt): List[Term] = s match {
    case CompStmt(stmts: List[Stmt]) =&gt; stmts match {
      case Nil =&gt; Nil
      case x::xs =&gt; svc(ctxt)(pre, x) ++ svc(ctxt)(asp(ctxt)(pre, x), CompStmt(xs))
    }
    case CondStmt(cond: Expr, ifBranch: Stmt, elseBranch: Stmt) =&gt; 
      svc(ctxt)({st: Term=&gt; And(Logic.sem(ctxt, st, cond), pre(st))}, ifBranch) ++
      svc(ctxt)({st: Term=&gt; And(Not(Logic.sem(ctxt, st, cond)), pre(st))}, elseBranch)
    case AssignStmt(lhs: Expr, rhs: Expr) =&gt; ??? 
    case SpecStmt(sp) =&gt; List(Implies(Logic.sem(ctxt, pre, sp), pre))
  }
  </code></pre>
  
  <p>I am wondering about the last case, the "SpecStmt". The method "Logic.sem" is defined as follows:</p>
  
  <pre><code>def sem(ctxt: Env, s: Term, e: Expr): Term
  </code></pre>
  
  <p>So I have a <code>pre</code> of type <code>Spec</code>, e.g. <code>Term =&gt; Term</code>. I know want to get from the <code>pre</code> to a single <code>Term</code> which I can pass to the <code>Logic.sem</code>-method.</p>
  
  <p>I know I am missing a basic concept here, so can please someone point me in the right direction?</p>
  
  <p>Thanks in advance!</p>