src/promissory-arbiter.js
function minBy (valueComputer, list) {
    var
      idx = 0,
      winner = list[idx],
      computedWinner = valueComputer(winner),

      computedCurrent;

    while (++idx < list.length) {
      computedCurrent = valueComputer(list[idx]);

      if (computedCurrent < computedWinner) {
        computedWinner = computedCurrent;
        winner = list[idx];
      }
    }

    return winner;
  }
function minBy (valueComputer, list) {
    var
      idx = 0,
      winner = list[idx],
      computedWinner = valueComputer(winner),

      computedCurrent;

    while (++idx < list.length) {
      computedCurrent = valueComputer(list[idx]);

      if (computedCurrent < computedWinner) {
        computedWinner = computedCurrent;
        winner = list[idx];
      }
    }

    return winner;
  }
function minBy ( valueComputer , list ) { var idx = 0 , winner = list [ idx ] , computedWinner = valueComputer ( winner ) , computedCurrent ; while ( ++ idx < list . length ) { computedCurrent = valueComputer ( list [ idx ] ) ; if ( computedCurrent < computedWinner ) { computedWinner = computedCurrent ; winner = list [ idx ] ; } } return winner ; }
Finds the `minimum` element of an array according to the `valueComputer` function.
Finds the minimum element of an array according to the valueComputer function .