Skip to content

Instantly share code, notes, and snippets.

@saralilyb
Created February 29, 2016 22:18
Show Gist options
  • Save saralilyb/0ef13bf42524eefe2fed to your computer and use it in GitHub Desktop.
Save saralilyb/0ef13bf42524eefe2fed to your computer and use it in GitHub Desktop.
Array Min and Max functions using NumericJS through mapreduce
arrmax = numeric.mapreduce('if(xi > accum) accum=xi;','-Infinity');
arrmin = numeric.mapreduce('if(xi < accum) accum=xi;','Infinity');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment