public Optional<T> getValue(Identifier name) {
        for (ScopeLayer<T> layer : scope) {
            if (layer.containsType(name)) {
                return Optional.of(layer.getType(name));
            }
        }
        return Optional.empty();
    }
Gets the first value in scope for the specified identifier.

@param name the identifier to retrieve a value for.
@return an optional of the value for the identifier, or empty otherwise.
smithy-rules-engine/src/main/java/software/amazon/smithy/rulesengine/language/evaluation/Scope.java