Jason Grout wrote :
And maybe also a reason for us to make things more discoverable. For example, I think changing M.apply_map() to M.map() would make it much easier to discover
(or at least making M.map() an alias of M.apply_map()).
Indeed I also don't think to look at matrix.apply_map() method.
I try the matrix.map[tab] and get no result, and matrix.[tab] and get too many results.

A method matrix.map() so consistent :

The main map is a _function_ with a result which is a _list_. (not a method)
There is no method map over lists, only this function map.
The function map over tuple outcomes also a list. (not a tuple)

I don't find any explicit map over iterator.
it=(1..10^4) ; it2 = (3*x for x in it) # looks like a map.

CartesianProduct takes 2 iterators (by example a set) and built a new iterator.
This is almost (x,y) for x in it1 for y in it2.
But the previous CartesianProduct (it, it2) fails because it and it2 are linked.
CartesianProduct has this *.map method.

I also test Sequence ([1..12]) which seems typed list, and Sequence doesn't have any map method.

I can describe map in Maple by
map operates over everything and keeps the same structure, even a map over f(a,b,c)

map in Mupad was :
map operates over lists, matrix and finite sets and keeps the same structure.

map in Python seems to be :
the _function_ map operates over tuple, lists and iterator, and outcomes a list.

In what way goes Sage for this map functions ?

F.

--
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/sage-support
URL: http://www.sagemath.org

Reply via email to