[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] RE: types as values
From: |
Bill Page |
Subject: |
[Axiom-developer] RE: types as values |
Date: |
Fri, 23 Sep 2005 14:24:59 -0400 |
On September 23, 2005 2:07 PM I wrote:
>
> I find that in Aldor at least it is possible to treat types as
> values and return them as the result of functions.
> ...
> How can I use it in Axiom in a useful manner?
> ...
> Any ideas?
>
Perhaps here is a clue:
(2) -> I:=tt2(0)
(2) Integer
Type:
Type
(3) -> x:I
I is not a valid type.
(3) -> J:=Integer
(3) Integer
Type:
Domain
(4) -> x:J
Type:
Void
(5) -> x:=1
(5) 1
Type:
Integer
-----------
So my tt2(0) function is returning something from the domain
'Type'. But in (3) above the type of the result is 'Domain'.
This makes my head spin a little! :)
How can a write a function that returns something of type
'Domain'?
Or am I really terribly confused about all this?
Regards,
Bill Page.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Axiom-developer] RE: types as values,
Bill Page <=