aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBill Page <bill.page@newsynthesis.org>2016-04-05 11:53:56 -0400
committerBill Page <bill.page@newsynthesis.org>2016-04-05 11:53:56 -0400
commit9be366caa7d9ca6d2c851f93939ad7d569d78aa8 (patch)
treeb6175850a546c18c473d0dc5ca2d9de82db914ca /src
parent3d46fd5b7318beb00cfb780389650fcfe4b45065 (diff)
downloadopen-axiom-9be366caa7d9ca6d2c851f93939ad7d569d78aa8.tar.gz
Add enumerate to domains that have Finite
Port change from FriCAS https://github.com/fricas/fricas/commit/dbf6a9b559e6872f5a3baa7e55a1c57130f1c335
Diffstat (limited to 'src')
-rw-r--r--src/algebra/catdef.spad.pamphlet3
1 files changed, 3 insertions, 0 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>>=