> Hmmm... Acutally I really wouldn't expect this to work in the
> interpreter given what I know about it's design, but it seems OK in
> when using the compiler:
>
> (3) -> h := plus2(double2,double2)$PLSPKG(FLOAT,FLOAT)
>
> (3) theMap(PLSPKG;plus2;3M;1!0,655)
> Type: (Float -> Float)
> (4) -> h 3.5
>
> (4) 14.0
> Type: Float
> (5) ->
Yeah, but I don't want to specify the '$PLSPKG(FLOAT,FLOAT)' by hand, I want
Fricas to do type inference for me, to be exact, I want 'h :=
plus2(double2,double2)'
to act like as if the following Spad code have been added into the system:
AnonymousPackage(A:AbelianSemiGroup) : Exports == Impl where
Exports == with
h : A->A
Impl == add
h x == double2 x+ double2 x
So that I can do 'h := plus2(double2,double2);h 4; h 3.5' without
specify any type.
--
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.