On Feb 3, 2008 9:39 AM, root <
address@hidden> wrote:
>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 type system, forces you to understand
what your _expression_ means. In your original case you are asking to
create a list object. Lists have a single type based on their
contents. The full type of the list is List Factored Integer
so all of the elements are of the same type.
Axiom correctly resolved to the lowest common point in the type tower
and this is both the correct and expected behavior.
If you want a List Any immediately you could construct one as in:
m:List Any:=nil
for n in 10..30 repeat output concat(i,concat(j,m))
or, more concisely:
for n in 10..30 repeat output [n::Any, factor(2^n-1)]
Tim