       s1 = matchType t1.types[0], t2.types[0]
       # log "after matching", s1
       # I will imply functional dependency of the form A a b c | a -> b c
-      s2 = mostGeneralUnifier (new Types (substituteList s1, t1.types[1...])), (new Types t2.types[1...])
+      # s2 = mostGeneralUnifier (new Types (substituteList s1, t1.types[1...])), (new Types t2.types[1...])
+      s2 = unifyImpliedParams (substitute s1, t1), t2
       s3 = mergeSubs s1, s2
       s3 or
         unifyFail t1, t2

  """
  """(get "c" (map (+ 1) {a: 3 b: 2 c: 4}))""", 5

  # The following doesn't work because the Collection type class specifies
  # that the constructor takes only one argument.
  #

  else
    unifyFail t1, t2
    # newMapWith "could not unify", [(safePrintType t1), (safePrintType t2)]

unifyImpliedParams = (t1, t2) ->
  mostGeneralUnifier (new Types t1.types[1...]), (new Types t2.types[1...])

joinSubs = (s1,s2) ->
  subUnion s1, (mapSub ((type) -> substitute s1, type), s2)
