@resultBuilder public enum NodeBuilder { public static func buildPartialBlock(first: N) -> N { first } public static func buildArray(_ components: [N]) -> Group { .init(components) } public static func buildOptional(_ component: N?) -> OptionalNode { .init(component: component) } public static func buildEither(first component: N) -> N { component } public static func buildEither(second component: N) -> N { component } public static func buildPartialBlock(accumulated: N0, next: N1) -> Group { .init([accumulated, next]) } } public struct OptionalNode: Node { let component: N? public var body: some Node { component?.render() ?? "" } }