YamlSequence FromSpan <T>(ReadOnlySpan <T> collection, Func <T, YamlObject> selector)
        {
            var result = new YamlSequence();

            foreach (var item in collection)
            {
                result.Add(selector(item));
            }

            return(result);
        }
        YamlSequence FromEnumerable <T>(IEnumerable <T> collection, Func <T, YamlObject> selector)
        {
            var result = new YamlSequence();

            foreach (var item in collection)
            {
                result.Add(selector(item));
            }

            return(result);
        }