Passing a selection makes sense. Or it could just be a pair of positions. Also, I’d include itemType
directly in the parameters of the function—if we don’t have to correspond to the command function signature, there’s not need for the wrapping factory function.