aboutsummaryrefslogtreecommitdiff
path: root/src/algebra
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra')
-rw-r--r--src/algebra/array1.spad.pamphlet5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/algebra/array1.spad.pamphlet b/src/algebra/array1.spad.pamphlet
index 9ace920a..ee4b913b 100644
--- a/src/algebra/array1.spad.pamphlet
+++ b/src/algebra/array1.spad.pamphlet
@@ -17,12 +17,14 @@
PrimitiveArray(S:Type): OneDimensionalArrayAggregate S == add
macro NNI == NonNegativeInteger
import %icst0: Integer from Foreign Builtin
+ import %icst1: Integer from Foreign Builtin
import %vlength: % -> NNI from Foreign Builtin
import %vcopy: % -> % from Foreign Builtin
import %vfill: (%,S) -> % from Foreign Builtin
import %aref: (%,Integer) -> S from Foreign Builtin
import %emptyArray: Type -> % from Foreign Builtin
import %list2array: (List S,Type) -> % from Foreign Builtin
+ import %array2list: % -> List S from Foreign Builtin
import %simpleArray: (Type,NNI,S) -> % from Foreign Builtin
#x == %vlength x
@@ -36,6 +38,9 @@ PrimitiveArray(S:Type): OneDimensionalArrayAggregate S == add
setelt(x:%, i:Integer, s:S) == %store(%aref(x,i),s)$Foreign(Builtin)
fill!(x, s) == %vfill(x,s)
copy x == %vcopy x
+ maxIndex x == #x - %icst1
+ parts x == %array2list x
+ members x == parts x
@