question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] min/max/minMax operators

See original GitHub issue

For now I can use e.g.

const minValue = Math.min(...execPipe( /* the pipeline */ ))

But it’s a little bit cumbersome and does not feel like I’ve fully harnessed the power of pipeline. It would be great if we can simply write

const minValue = execPipe( 
  /* the pipeline */ ,
  min
)

Same goes to max and (maybe) minMax.

By the way currently the following code does not work:

const minValue = execPipe( 
  /* the pipeline */ ,
  arrayFrom,  // with or without arrayFrom
  Math.min
)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:22 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
conartist6commented, Jun 4, 2022
const minValue = execPipe( 
  iterable,
  /* the pipeline */ ,

  apply(Math.min),
  // OR
  reduce(Infinity, Math.min),
)
0reactions
conartist6commented, Sep 12, 2022

Wow, great. I’m going to move further discussion to your PR for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

add max/min operators · Issue #276 · openwdl/wdl - GitHub
When writing WDL we sometimes need to compute min/max, e.g. when computing a value based on scatter, or computing VM size data based...
Read more >
Min/Max values on other data displays - Feature Requests - The ...
How about adding max/min values on website so we can quickly see the data instead going to the history tab? Max Temp, Min...
Read more >
Customise the messages displayed by the Min/Max Quantities ...
Have a new idea? Thought of a new feature or product improvement? Share with us and let the community be a part of...
Read more >
NCO netCDF Operators / Feature Requests / #3 Improved hyperslab ...
My suggestion is to adopt python convention of using negatives within the usual [min:max:stride] indicies to count backwards. ie, the last case below:....
Read more >
Structure in Min-Max Optimization (and How to Use It!)
Min-max optimization problems arise in a variety of applications in mathematical programming, engineering, finance, and machine learning.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found