index.js
function findMorph (args, morphs) {
  for (var i = 0; i < morphs.length; i++) {
    var sig = morphs[i].sig

    if (args.length == sig.length) {
      var matched = true

      for (var j = 0; j < sig.length; j++) {
        if (!isType(sig[j], args[j])) {
          matched = false
          break
        }
      }

      if (matched) {
        return morphs[i]
      }
    }
  }
  throw new Error('No matching function signature')
}
function findMorph (args, morphs) {
  for (var i = 0; i < morphs.length; i++) {
    var sig = morphs[i].sig

    if (args.length == sig.length) {
      var matched = true

      for (var j = 0; j < sig.length; j++) {
        if (!isType(sig[j], args[j])) {
          matched = false
          break
        }
      }

      if (matched) {
        return morphs[i]
      }
    }
  }
  throw new Error('No matching function signature')
}
Find a morph for the passed arguments