Merge branch 'master' of github.com:Araq/Nimrod
This commit is contained in:
commit
e7f0544154
1 changed files with 6 additions and 0 deletions
|
|
@ -1464,6 +1464,12 @@ proc isNil*[T: proc](x: T): bool {.noSideEffect, magic: "IsNil".}
|
||||||
## Fast check whether `x` is nil. This is sometimes more efficient than
|
## Fast check whether `x` is nil. This is sometimes more efficient than
|
||||||
## ``== nil``.
|
## ``== nil``.
|
||||||
|
|
||||||
|
proc `==` *[I, T](x, y: array[I, T]): bool =
|
||||||
|
for f in low(x)..high(x):
|
||||||
|
if x[f] != y[f]:
|
||||||
|
return
|
||||||
|
result = true
|
||||||
|
|
||||||
proc `@`*[T](a: openArray[T]): seq[T] =
|
proc `@`*[T](a: openArray[T]): seq[T] =
|
||||||
## turns an openarray into a sequence. This is not as efficient as turning
|
## turns an openarray into a sequence. This is not as efficient as turning
|
||||||
## a fixed length array into a sequence as it always copies every element
|
## a fixed length array into a sequence as it always copies every element
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue