On Wed, Apr 23, 2014 at 9:54 PM, Bill Page <[email protected]> wrote:
> Strictly speaking the following commands to the interpreter
>
>      plus (f,g) == x+->f(x)+g(x)
>
> and
>
>      double n == n + n
>
> do not define functions but rather "modes".  A mode can stand for many
> possible functions.
>
> On the other hand
>
>     plus(f:INT->INT,g:INT->INT):INT->INT == (x:INT):INT +-> f(x)+g(x)
>
> does define a function.
>
> Your interpreter example works for me if types are fully specified.


Exactly, but I want the 'plus' to return a "mode" rather than a function,
so that I can specialize it with different types later: I want to do not only
h(4) but also h(3.5), as if I have defined h as 'h x == double x + double x'.

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to