     items = _arguments call
     compiledItems = uniformCollectionCompile ctx, call, items, hashsetType
     assignCompile ctx, call, (irSet compiledItems)
+
+ms.Map = ms_Map = (ctx, call) ->
+  if hashset = ctx.assignTo()
+    # TODO:
+    throw new Error "matching on sets not supported yet"
+  else
+    args = _arguments call
+    if args.length % 2 != 0
+      malformed args[args.length - 1], 'Missing value for key'
+    [labels, items] = unzip pairs args
+    compiledLabels = uniformCollectionItemsCompile ctx, labels
+    keyType = applyKindFn hashmapType, compiledLabels.itemType
+    compiledItems = uniformCollectionCompile ctx, call, items, keyType,
+      compiledLabels.constraints
+    assignCompile ctx, call, (irMap compiledLabels.compiled, compiledItems)
 
 # Before assign the correct type to plus
 # ms['+'] = ms_plus = (ctx, call) ->

  """
  """(elem? "a" data)""", yes

  # TODO: support matching with the same name
  #       to implement this we need the iife to take as arguments all variables
  #       with the same names, since JavaScript shadows it too strongly and

    keys = (map (__ string_, _labelName), labels)
    assignCompile ctx, form, (irMap keys, compiledItems)


uniformCollectionCompile = (ctx, form, items, collectionType, moreConstraints = []) ->
  {constraints, itemType, compiled} = uniformCollectionItemsCompile ctx, items
  form.label = 'operator' if not isCall form
  form.tea = new Constrained (join moreConstraints, constraints),
      new TypeApp collectionType, itemType
  compiled

uniformCollectionItemsCompile = (ctx, items) ->
  itemType = ctx.freshTypeVariable star
  compiledItems = termsCompile ctx, items
  for item in items
    unify ctx, itemType, item.tea.type
  constraints: (concatMap _constraints, (tea for {tea} in items))
  itemType: itemType
  compiled: compiledItems

# arrayToConses = (elems) ->
#   if elems.length is 0
