makelist vs create_list



On 4/9/07, Stavros Macrakis <macrakis at alum.mit.edu> wrote:

> I would prefer to unify the two as follows:
>
>         makelist(expr, i, ilist, j, jlist, ...)
> ==   makelist(expr, i, i0..i1, j, j0..j1, ...)

OK.

> The multiple arguments to map have completely different semantics:
>
>        map(f,[1,2],[3,4]) => [ f(1,3), f(2,4) ]
>        create_list(f(a,b),a,[1,2],b,[3,4]) => [f(1, 3), f(1, 4), f(2,
> 3), f(2, 4)]

I guess that makes create_list redundant with cartesian_product
or maybe outermap in the multiple argument case (not map).

But now I'm wondering --- is makelist w/ multiple arguments
supposed to be like map or like cartesian_product or outermap?
Or something else?

> Because (a) two dots for an integer range is established notation in
> many languages (Pascal, Ada, Perl, Ruby, Maple); and (b) three dots is
> generally used to mean something else both in mathematics and in
> Maxima.

OK I guess. Not a big deal.

FWIW
Robert