I think this is a little prettier:
(1) - __ (x,y) == hconcat(x,y)$OutputForm
Type: Void
(2) - for n in 10..30 repeat output(n = ::Symbol factor(2^n-1))
Here, once the concept of is understood, the only obscure notation
is
Hi Alasdair,
On 02/02/2008 09:49 PM, Alasdair McAndrew wrote:
Clearly there's more going on here than a lummox like me can follow. I
would possibly argue, though, that in spite of Martin's explanation of
why axiom presents n in factored form in my original expression:
for n in 10..30 repeat
Actually,
for n in 10..30 repeat output [n::String, factor(2^n-1)]
is probably the simplest.
-Alasdair
On Feb 2, 2008 11:29 PM, Bill Page [EMAIL PROTECTED] wrote:
On 02 Feb 2008 08:28:29 +0100, Martin Rubey wrote:
I think this is a little prettier:
(1) - __ (x,y) ==
On 2/2/08, Alasdair McAndrew [EMAIL PROTECTED] wrote:
Actually,
for n in 10..30 repeat output [n::String, factor(2^n-1)]
is probably the simplest.
Although this apparently produces the effect that you wanted I think
it is also a very poor notation to achieve this effect. To understand
why
Clearly there's more going on here than a lummox like me can follow. I
would possibly argue, though, that in spite of Martin's explanation of why
axiom presents n in factored form in my original expression:
for n in 10..30 repeat output [n, factor(2^n-1)]
it is axiom which is at fault, or at
it is axiom which is at fault, or at least the expression parsing of it.
Since factor clearly is only applied to the second term in the list, it
shouldn't be applied to the first. And I shouldn't have to coerce n to type
String, Symbol etc to force nonfactoring.
Axiom's type system, like any
Not to worry, you're not the first person to struggle with
Axiom's type tower. If you think the interpreter is bad,
you have to play with the compiler.
Tim
___
Axiom-mail mailing list
Axiom-mail@nongnu.org