You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_.if would take two arguments, a primary function and a conditional function. It would return a new function that, when called, will call the primary function only if the conditional (called with the same arguments) returns a truthy value. It would look something like this:
I don't think being deemed "useful" is a hard condition for entry into Contrib, as Contrib is in part a testing ground to see whether people actually end up using a function (@joshuacc please correct me if I'm wrong).
That said: I can't predict whether people will find this useful, but the idea seems interesting in any case.
_.if would take two arguments, a primary function and a conditional function. It would return a new function that, when called, will call the primary function only if the conditional (called with the same arguments) returns a truthy value. It would look something like this:
This way you can write generic functions and then easily add conditions for execution when passing them to iterators. Something like:
Would this be a useful addition?
The text was updated successfully, but these errors were encountered: