I'd suggest making the reverse function recursive; since I think that is the most common use case. For an exemplary Word a b + c d, reverse() would make it c d + a b, swapping the order of the morphemes, but not the segments inside the morphemes. I think, in the regular use case, you would rather want to end up with d c + b a.
If you agree and think this is useful, I would quickly implement that; as it should be fairly simply.
I'd suggest making the
reversefunction recursive; since I think that is the most common use case. For an exemplary Worda b + c d,reverse()would make itc d + a b, swapping the order of the morphemes, but not the segments inside the morphemes. I think, in the regular use case, you would rather want to end up withd c + b a.If you agree and think this is useful, I would quickly implement that; as it should be fairly simply.