1
abstract type Enumerable end
2

3 0
Base.IteratorSize(::Type{T}) where {T <: Enumerable} = Base.SizeUnknown()
4 0
IteratorInterfaceExtensions.isiterable(x::Enumerable) = true
5

6 0
haslength(S) = Base.IteratorSize(S) isa Union{Base.HasLength, Base.HasShape} ? Base.HasLength() : Base.IteratorSize(S)

Read our documentation on viewing source code .

Loading