function find (fn, signature) {
      if (!fn.signatures) {
        throw new TypeError('Function is no typed-function');
      }

      // normalize input
      var arr;
      if (typeof signature === 'string') {
        arr = signature.split(',');
        for (var i = 0; i < arr.length; i++) {
          arr[i] = arr[i].trim();
        }
      }
      else if (Array.isArray(signature)) {
        arr = signature;
      }
      else {
        throw new TypeError('String array or a comma separated string expected');
      }

      var str = arr.join(',');

      // find an exact match
      var match = fn.signatures[str];
      if (match) {
        return match;
      }

      // TODO: extend find to match non-exact signatures

      throw new TypeError('Signature not found (signature: ' + (fn.name || 'unnamed') + '(' + arr.join(', ') + '))');
    }
Find a specific signature from a (composed) typed function, for example:

  typed.find(fn, ['number', 'string'])
  typed.find(fn, 'number, string')

Function find only only works for exact matches.

@param {Function} fn                   A typed-function
@param {string | string[]} signature   Signature to be found, can be
                                       an array or a comma separated string.
@return {Function}                     Returns the matching signature, or
                                       throws an error when no signature
                                       is found.