subscripted functions as arguments



arrayinfo is one of those annoying functions which, "for the user's
convenience", quotes its argument.

You can define

      xarrayinfo(sym) := apply('arrayinfo,[sym])

It seems that you'd like to apply an array to a list of subscripts.  That
is what arraymake does.  You say that composing arraymake with funmake
doesn't work.  Can you give an example?  I have no problem with:

       funmake( arraymake(f,[2,3]), [23, 47])), which returns f[2,3](23,47)

Beyond that, you don't say what you want to do in your "function that
operates on subscripted functions".  Do you just want to *construct* objects
like f[2,3](23,47), or do you want to *evaluate* them?

          -s


On Mon, Oct 28, 2013 at 4:44 PM, MGJT <valhifi at gmail.com> wrote:

> (sorry for the multiple messages, a cat is to blame... anyway)
>
> consider the following example
>
> foo[j] (x) := j * sin (x)$
>
> arrayinfo (foo);
>
> -> [hashed, 1, [j]]
>
> checkfoo (fun, idx, var) :=
>   arrayinfo (fun)$
>
> checkfoo (foo, j, [x]);
>
> -> arrayinfo: fun is not an array.
>
> When dealing with regular functions as arguments, as opposed to
> subscripted ones, I have been able to circumvent difficulties within a
> function definition by calling 'funmake (foo, var)'.
>
> What I would like to accomplish is to define a function that operates on
> subscripted functions. It is important, however, that the user be able to
> specify a list of indices separately from a list of variables, because the
> former is of unknown length and its first and last elements have special
> significance. Composing 'arraymake' with 'funmake' does not seem to do the
> trick.
>
>
> Thank you in advance.
>
> Cheers,
>
> Manuel GJT
>
>
> On Mon, Oct 28, 2013 at 4:34 PM, MGJT <valhifi at gmail.com> wrote:
>
>> Dear maxima list,
>>
>>
>> I would very much appreciate your help in elucidating the intricacies of
>> passing a subscripted function as an argument.
>>
>>
>>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>