[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-mail] Declare variable type within function
From: |
Bill Page |
Subject: |
Re: [Axiom-mail] Declare variable type within function |
Date: |
Mon, 17 Mar 2008 12:19:53 -0400 |
On 3/17/08, Themos Tsikas wrote:
> foo(x) == list x
>
> works for you?
>
This function is *not* equivalent to what Angelos wrote which could
actually be written most simply as just:
foo(x) == x
> > foo(x)==
> > L:=[x.1-x.1]
> > L:= append(L,x)
> > return L
However I am sure that he intended this only as an example and in
general the logical of this function could be much more complex then
just calling append and returning what was passed. As I understand it
the point of the example is that we want 'L' to have the *same type*
as 'x' but a different value - without ever specifying the actual type
of 'x'.
Regards,
Bill Page.