diff options
author | Araq <rumpf_a@web.de> | 2013-09-01 15:54:46 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-09-01 15:54:46 +0200 |
commit | e7f05441546596405144cf602992ef515dda1cf6 (patch) | |
tree | 96785e7e5bc1f79a7e4b9d0aa8a98e625a542110 | |
parent | 6825a69a70f177d7997f3e673b24c6c6c2d7449b (diff) | |
parent | 62ed6b0aaff64e3a1294f629b482d837dc4a0c83 (diff) | |
download | Nim-e7f05441546596405144cf602992ef515dda1cf6.tar.gz |
Merge branch 'master' of github.com:Araq/Nimrod
-rw-r--r-- | lib/system.nim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/system.nim b/lib/system.nim index 40a9be2d4..4ff1f1577 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -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 ## ``== 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] = ## 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 |