Any interest in including something like this:
I have just written this code a second time, needing it again and not remembering I had already implemented it once.
It seems to fit very well alongside joiner() and cycler(), and presumably is a common usecase.
Not a bad idea. Though the default should probably be undefined for consistency with the inline if expression.
Which value specifically do you suggest should default to undefined?
I have implemented the code as-is here: