Skip to content

Conversation

@glopesdev
Copy link
Member

There are many cases in which empty sequences may cause undesired behavior due to downstream operator constraints enforcing a minimum of one value for successful processing (e.g. see #1617). Similarly, it can also be useful to enforce that a sequence always ends with a specific value, no matter when it terminates.

For both of these cases the Prepend and Append operators can be very convenient. Although equivalent behavior may be obtained using Concat and similar observable combinators, the convenience of Prepend and Append lays in the fact that the desired value can be specified inline with the sequence itself, without requiring merging of external sequences.

The current limitation is that any such appended or prepended values must be XML serializable as they will be stored together with the workflow. This is the same limitation present in other binary operators such as Add, Subtract, etc. when used by themselves.

Fixes #657
Closes #1617

@glopesdev glopesdev added the feature New planned feature label May 1, 2025
@glopesdev glopesdev added this to the 2.9 milestone May 1, 2025
@glopesdev glopesdev requested a review from a team May 1, 2025 12:49
@glopesdev glopesdev merged commit b8658ad into bonsai-rx:main May 7, 2025
10 checks passed
@glopesdev glopesdev deleted the issue-657 branch May 7, 2025 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New planned feature

Projects

None yet

1 participant