   set.size -= 1
   delete set.values[key]
 
-setInMap = (set, key, value) ->
-  return unless set.values[key]
-  set.values[key] = value
-
 addAllToSet = (set, array) ->
   for v in array
     addToSet set, v

        # assume if definedParams.length > 0
        argName = freshName nameIndex
        param = definedParams[0]
        context = unionMaps context, newMapWith param.token, argName
        [s1, A] = infer context, body, nameIndex + 1
        [s1, subExp s1, [argName, A]]

      # Call
      else if Array.isArray expression
        [op, arg] = inside expression
        # assume call.length is 2
        returnName = freshName nameIndex
        [s1, A] = infer context, op
        [s2, B] = infer (subContext s1, context), arg
        log "op", (subExp s2, A)
        log "operand", [B, returnName]
        s3 = unify (subExp s2, A), [B, returnName]
        log "s3", s3
        [(concat s3, s2, s1), (subExp s3, returnName)]

unify = (t1, t2) ->
  unifyWith newMap(), [t1, t2]

unifyWith = (subs, pairs) ->
  if pairs.length is 0

subContext = (subs, context) ->
  newContext = newMap()
  for name, t of context.values
    addToMap newContext, name, (subExp subs, t)
  newContext

isTypeVariable = (name) ->
  not (Array.isArray name) and name.charCodeAt(0) >= 97

freshName = (nameIndex) ->
  # TODO: handle more than 27 variables
