Sequence

extension Sequence where Element: NodeIDProtocol

Available where Element: NodeIDProtocol

  • Returns a sequence containing, in order, the elements of self that are IDs of a Subject.

    Declaration

    Swift

    public func filter<Subject: Node>(
      _: Subject.Type
    ) -> LazyMapSequence<LazyFilterSequence<LazyMapSequence<Self, Subject.ID?>>, Subject.ID>
  • Returns the unique element in self that is an ID of Subject, if any.

    Declaration

    Swift

    public func unique<Subject>(_ s: Subject.Type) -> Subject.ID? where Subject : Node