Changes
http://wiki.axiom-developer.org/276TheResultLooksLikeARecordButIsntARecord/diff
--
FMy,
I think you meant to write:
\begin{axiom}
select(t+->t.remainder=1,map (t +-> divide (10*t, 21), expand (1..20)))
\end{axiom}
There is no meaning for 't.2'
I disagree that one should use a list as cartesian product of
sets. This is very much against the strong-type design of Axiom.
Instead Axom should provide a type equivalent to the cartesian
product and it should be (nearly) as flexible as Lists. The next
best thing that Axiom has is Record.
When creating an anonymous function you can provide specific types:
\begin{axiom}
L:=map ((t:INT):Record(t:INT,p:POLY INT) +-> [t, X^t-1], expand (0..10))
\end{axiom}
so that the result is clear.
The discussion of Lists, Tuples, Products and Records in Axiom
is an old one. See:
- http://wiki.axiom-developer.org/TuplesProductsAndRecords
- http://wiki.axiom-developer.org/SandBoxDirectProduct
- http://wiki.axiom-developer.org/187TroubleWithTuples
- http://wiki.axiom-developer.org/CartesianProduct
I agree that Axiom does not get this right. In Aldor the
'Product' type is generalized to 'Cross'.
I do not know yet how to understand the domain 'Any' but
I think it is very interesting. It is probably very close
to what is called "duck typing" in modern terms:
http://en.wikipedia.org/wiki/Duck_typing
This a form of dynamic typing where the values from the
domain 'Any' carry with them their actual types. To me
this seems like a "partially successful" early experiment
with this idea - *Another remarkable first for the Axiom
developers!* But it is only partially sucessful because
all of the implications about how it should interact with
the rest of the static strongly-typed language of Axiom is
not fully worked out.
--
forwarded from http://wiki.axiom-developer.org/[EMAIL PROTECTED]