 
 findFrees = (type) ->
   if Array.isArray type
-    concat (for subType in type
+    concatSets (for subType in type
       findFrees subType)...
   else
     if isTypeVariable type

freshName = (nameIndex) ->
  # TODO: handle more than 27 variables
  String.fromCharCode 97 + nameIndex

concat = (maps...) ->
  concated = newMap()
  for map in maps
    for k, v of map.values
      addToMap concated, k, v
  concated

# mycroft = (context, node, environment) ->
#   if node.label is 'numerical'

    addToMap initialized, k, args[i + 1]
  initialized

concatSets =
concatMaps = (maps...) ->
  concated = newMap()
  for map in maps
    for k, v of map.values
      addToMap concated, k, v
  concated

# end of Set

# Type inference and checker
