         {params, body, wheres} = fnDefinition expression
         # TODO: more params
         definedParams = inside params
-        # assume if definedParams.length > 0
+        if definedParams.length is 0
+          throw new TypeError "Typing lambdas without a param not implemented yet"
         argName = freshName nameIndex
         param = definedParams[0]
         context = concatMaps context, newMapWith param.token, argName


tokenizeAndTypeInferDefinitions = (source) ->
  ast = tokenizedDefinitions source
  inferWheres builtInContext(), (pairs ast), 3
  ast

# Correct offset by 1 in positions, when we wrap the source in an S-exp

      [t2from, t2to] = t2
      unifyWith subs, [[t1from, t2from], [t1to, t2to]].concat rest
    else
      throw new TypeError "Types #{t1}, #{t2} could not be unified", [t1, t2]

subPairs = (subs, pairs) ->
  for [t1, t2] in pairs
