[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] pointers

From: Gabriel Dos Reis
Subject: Re: [Axiom-developer] pointers
Date: Mon, 9 Nov 2009 21:21:28 -0600

On Mon, Nov 9, 2009 at 7:09 PM, William Sit <address@hidden> wrote:
> Tim:
> Interesting. Is there a similar function that is more structural? say, can I
> test whether some domain (which may be passed as a parameter of type Field)
> is of the form Fraction(something) and if so, extract "something" (that is,
> assign it to a variable and further test it), sort of a deconstruction?

William --

   In OpenAxiom, when you get a domain, you can reify it, and
ask for the arguments that were used to instantiate it:

(1) -> reify Fraction Integer
   (1)  Fraction Integer
                                      Type: ConstructorCall DomainConstructor
(2) -> arguments reify Fraction Integer
   (2)  [(Integer)]
                                                            Type: List Syntax

reply via email to

[Prev in Thread] Current Thread [Next in Thread]