someone wrote:
> 
> Just for completeness here the full code:
> 
>     horizSplit(A:M, lc:LPI) : List M ==
> 
>       al : LPI := [1,2,3,4,5]
>       l : LPI := scan(_+, al, 1$PI)
> 
>       [A]
> 
>  ****** comp fails at level 4 with expression: ******
> error in function horizSplit 
> 
> (SEQ
>  (LET (|:| |al| (|List| (|PositiveInteger|)))
>    (|construct| 1 2 3 4 5))
>  (LET (|:| |l| (|List| (|PositiveInteger|)))
>    (|scan| | << + >> | |al| (|elt| (|PositiveInteger|) 1)))
>  (|exit| 1 (|construct| A)))
> ****** level 4  ******
> $x:= +
> $m:= $EmptyMode
> $f:=
> ((((|l| #) (|al| # #) (|value| # #) (|lc| # #) ...)))
>  
>    >> Apparent user error:
>    NoValueMode
>     is an unknown mode

This is incomplete code.  However '$EmptyMode' means that
there is something wrong with types.  Either types are
wrong or there is too little type declaration.

See the following complete example:

)abbrev package TTT TTT
TTT() : with (
    cumSum : List(NonNegativeInteger) -> List(NonNegativeInteger) )
 == add

    cumSum(l) == scan(_+, l, 0$NonNegativeInteger
                     )$ListFunctions2(NonNegativeInteger, NonNegativeInteger)


FriCAS interpreter sometimes is tries to call functions from
package not mentioned by users, however Spad will not try to
use function from package which was not imported (or explicitly
specified by package qualification).  Note: currently FriCAS
automatically imports some domains but this does not apply
to packages.

BTW: I use List(NonNegativeInteger) because otherwise I would have to
provide _+ from NonNegativeInteger time PositiveInteger into
PositiveInteger.

-- 
                              Waldek Hebisch
[email protected] 

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to