We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 327c39c commit 5fefef8Copy full SHA for 5fefef8
jl/range.jl
@@ -67,6 +67,12 @@ last{T}(r::Range1{T}) = r.start + oftype(T,r.len-1)
67
step(r::Range) = r.step
68
step(r::Range1) = one(r.start)
69
70
+copy(r::Range) = Range(copy(r.start),
71
+ copy(r.step),
72
+ copy(r.len))
73
+copy(r::Range1) = Range1(copy(r.start),
74
75
+
76
function ref{T}(r::Range{T}, i::Integer)
77
if !(1 <= i <= r.len); error(BoundsError); end
78
r.start + oftype(T,i-1)*step(r)
0 commit comments