From 9be366caa7d9ca6d2c851f93939ad7d569d78aa8 Mon Sep 17 00:00:00 2001 From: Bill Page Date: Tue, 5 Apr 2016 11:53:56 -0400 Subject: Add enumerate to domains that have Finite Port change from FriCAS https://github.com/fricas/fricas/commit/dbf6a9b559e6872f5a3baa7e55a1c57130f1c335 --- src/algebra/catdef.spad.pamphlet | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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} <>= -- cgit v1.2.3