File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,23 @@ information is adequately contained in the type for standard tools to work. In
94
94
these cases, ` restructure ` gives a way to convert for example an ` Array ` into
95
95
a matching ` ArrayPartition ` .
96
96
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
+
97
114
# List of things to add
98
115
99
116
- https://github.com/JuliaLang/julia/issues/22216
You can’t perform that action at this time.
0 commit comments