Skip to content

Commit fdae083

Browse files
committed
Update README.
1 parent b7dbfa4 commit fdae083

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,23 @@ information is adequately contained in the type for standard tools to work. In
9494
these cases, `restructure` gives a way to convert for example an `Array` into
9595
a matching `ArrayPartition`.
9696

97+
## known_first(::Type{T})
98+
99+
If `first` of instances of type `T` are known at compile time, return that first
100+
element. Otherwise, return `nothing`. For example, `known_first(Base.OneTo{Int})`
101+
returns `one(Int)`.
102+
103+
## known_last(::Type{T})
104+
105+
If `last` of instances of type `T` are known at compile time, return that
106+
last element. Otherwise, return `nothing`.
107+
108+
## known_step(::Type{T})
109+
110+
If `step` of instances of type `T` are known at compile time, return that step.
111+
Otherwise, returns `nothing`. For example, `known_step(UnitRange{Int})` returns
112+
`one(Int)`.
113+
97114
# List of things to add
98115

99116
- https://github.com/JuliaLang/julia/issues/22216

0 commit comments

Comments
 (0)