aboutsummaryrefslogtreecommitdiff
path: root/std/magic/arrays.pk
diff options
context:
space:
mode:
authorJJ2024-01-02 21:49:25 +0000
committerJJ2024-01-02 21:50:47 +0000
commitfde7a1311543badd1052a757d1e2c68272be1188 (patch)
treeabe438ea65ac8d90a1848593846531b59d0e1ce3 /std/magic/arrays.pk
parent4852f1caabcbcd5ad3dd5696bfe4bc428d653f94 (diff)
std: more fleshing out. merge std.magic back into std.prelude.
Diffstat (limited to 'std/magic/arrays.pk')
-rw-r--r--std/magic/arrays.pk20
1 files changed, 0 insertions, 20 deletions
diff --git a/std/magic/arrays.pk b/std/magic/arrays.pk
deleted file mode 100644
index a0207c1..0000000
--- a/std/magic/arrays.pk
+++ /dev/null
@@ -1,20 +0,0 @@
-## std.arrays: The array[T, S] primitive and associated functions.
-## A stub module for documentation.
-
-## Primitive fixed-size arrays. Their size is statically known at compile-time.
-pub type array[T, S: static[uint]]
-
-## Array access. Returns None if i is out of range.
-pub func get[T, S: static[uint]](self: array[T, S], i: uint): T?
-## Array mutation.
-# todo: how do we detect range errors?
-pub func set[T, S: static[uint]](self: mut array[T, S], i: uint, val: T): T?
-## A helper function to get the length of an array.
-## Known to the compiler, and computed at compile-time.
-pub func len[T, S: static[uint]](self: array[T, S], i: uint): T?
-
-type ArrayIter[T, S: static[uint]] = struct
- ...
-pub func iter[T, S: static[uint]](self: array[T, S]): ArrayIter[T, S]
-
-# todo: Eq, PartialEq, Ord, PartialOrd