Closed jnytra closed 1 year ago
Thanks for this!
It occurs to me that we should probably decide, and then document what happens if the user passes a negative value to drop()
, and then I need to update the actual implementation to match the documented behaviour! (This also applies to take()
).
We could either raise a runtime_error
if the user passes a negative value, or else clamp the value to zero (so we don't actually drop anything). Currently I think the former is probably the way to go.
Raise a runtime_error
or invalid_argument
if the user passes a negative value, sound good.
Let me fix the drop
and take
adaptors so they match what we'd like them to do, then I can merge the documentation
Codecov Report
Patch and project coverage have no change.
Additional details and impacted files
```diff @@ Coverage Diff @@ ## main #55 +/- ## ======================================= Coverage 98.37% 98.38% ======================================= Files 63 63 Lines 2280 2287 +7 ======================================= + Hits 2243 2250 +7 Misses 37 37 ``` [see 2 files with indirect coverage changes](https://codecov.io/gh/tcbrindle/flux/pull/55/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tristan+Brindle):umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.