static ReservedWords compose(ReservedWords... delegates) {
        return new ReservedWords() {
            @Override
            public String escape(String word) {
                for (ReservedWords reservedWords : delegates) {
                    if (reservedWords.isReserved(word)) {
                        return reservedWords.escape(word);
                    }
                }

                return word;
            }

            @Override
            public boolean isReserved(String word) {
                for (ReservedWords reservedWords : delegates) {
                    if (reservedWords.isReserved(word)) {
                        return true;
                    }
                }

                return false;
            }
        };
    }
Composes multiple instance of {@code ReservedWords} into a
single implementation that delegates to them one after the
other.

<p>Each reserved words implementation is invoked one after
the other until one of them returns true for
{@link ReservedWords#isReserved}.

<pre>
{@code
ReservedWords a = MappedReservedWords.builder().put("void", "_void").build();
ReservedWords b = MappedReservedWords.builder().put("foo", "_foo").build();
ReservedWords composed = ReservedWords.compose(a, b);
String safeWordA = composed.escape("void");
String safeWordB = composed.escape("foo");
System.out.println(safeWordA + " " + safeWordB); // outputs "_void _foo"
}
</pre>

@param delegates ReservedWords instances to delegate to.
@return Returns the created {@code ReservedWords} instance.
smithy-codegen-core/src/main/java/software/amazon/smithy/codegen/core/ReservedWords.java