Returns the minimum seen of an iterable as it changes. Streaming result: works with endless iterables.
Note that gt function returns true if A is greater than B, even though we're looking for the minimum.
gt
// Rank objects based on 'v' valueconst rank = (a,b) => a.v > b.v;min([ {i:0,v:1}, {i:1,v:9}, {i:2,v:-2}], rank);// Yields: {i:2, v:1}, {i:2,v:-2} Copy
// Rank objects based on 'v' valueconst rank = (a,b) => a.v > b.v;min([ {i:0,v:1}, {i:1,v:9}, {i:2,v:-2}], rank);// Yields: {i:2, v:1}, {i:2,v:-2}
Iterable
Should return true if a is greater than b.
a
b
Returns the minimum seen of an iterable as it changes. Streaming result: works with endless iterables.
Note that
gt
function returns true if A is greater than B, even though we're looking for the minimum.