diff options
-rw-r--r-- | src/algebra/catdef.spad.pamphlet | 3 | ||||
-rw-r--r-- | src/algebra/lodof.spad.pamphlet | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/algebra/catdef.spad.pamphlet b/src/algebra/catdef.spad.pamphlet index ee556b91..d81cb741 100644 --- a/src/algebra/catdef.spad.pamphlet +++ b/src/algebra/catdef.spad.pamphlet @@ -1086,6 +1086,8 @@ Finite(): Category == SetCategory with ++ \spad{x = index lookup x}. random: () -> % ++ random() returns a random element from the set. + enumerate : () -> List % + ++ enumerate() returns list of elements of the set. add --FIXME: Tthe only purpose of this local function is to bring --FIXME: the compiler to admission that the successor of a @@ -1095,6 +1097,7 @@ Finite(): Category == SetCategory with (1 + x) : PositiveInteger random() == index succ random(size())$NonNegativeInteger + enumerate() == [index(i::PositiveInteger) for i in 1..size()] @ \section{category FLINEXP FullyLinearlyExplicitRingOver} <<category FLINEXP FullyLinearlyExplicitRingOver>>= diff --git a/src/algebra/lodof.spad.pamphlet b/src/algebra/lodof.spad.pamphlet index aabb5d7d..ed513c73 100644 --- a/src/algebra/lodof.spad.pamphlet +++ b/src/algebra/lodof.spad.pamphlet @@ -62,7 +62,7 @@ SetOfMIntegersInOneToN(m, n): Exports == Implementation where reallyEnumerate() == [[b, i] for b in enum(m, n) for i in 1..] member?(p, s) == s.bits.p - enumerate() == + enumerate():Vector % == if empty? deref all then setref(all,reallyEnumerate()) deref all |