Changes 
http://wiki.axiom-developer.org/276TheResultLooksLikeARecordButIsntARecord/diff
--
Don't you think that in 
$F = \{ t \in E \mid P(t)\}$
it depends on what your E is?

If you think that E is the set $\{1,2,\ldots, 20\}$ then
something like
\begin{axiom}
)clear all
[t for e in 1..20 | (t:=divide(10*e,21); one?(t.remainder))]
\end{axiom}
looks quite mathematical, n'est pas? Well, there is a local assignment to $t$, 
but it's short enough.

If you like your way more than perhaps write
\begin{axiom}
K := [divide(10*t,21) for t in 1..20];
[t for t in K | t.remainder=1]
\end{axiom}

And, by the way, if it weren't for the fact that divide in Aldor's libalgebra 
library has signature::

  divide: (%, %) -> (%, %);

instead of Axiom's::

  divide: (%,%) -> Record(quotient:%,remainder:%)

The above construction would also work in Aldor. 
(The use of 'select' is not possible since it is a reserved keyword in Aldor.)

Ralf
--
forwarded from http://wiki.axiom-developer.org/[EMAIL PROTECTED]

Reply via email to