This reminds me of the dream I had in Experiment with defines: define unity. Looking forward to see it come to fruition.
As an example, I would love a more performant/expressive way to handle the following: I have a flow that returns a mix of numbers and #f
. I want to pass the numbers to min
, but there may not be any numbers (in which case min
barfs). The current solution is something like
(~> … (pass number?) (if (~> count zero?) #f min))
The perf is not great: I don't need to count the (possibly large) number of values when I only need to know if there's at least one.
I suppose now I can implement this test "at least one value" as a qi macro.