Outermap seems to treat all lists ([...]) and matrices (matrix(...)) as
defining the structure of the result.
Try outermap(f,...) on
[a]
[[[[[a]]]]]
matrix([[[matrix([[[a]]])]]]))
With more than one argument, it nests the input structures in the output
structure:
[a],matrix([b]) => [matrix([f(a,b)])]
[a],matrix([b]),[c],matrix([d,e],[f,[g]]) =>
[matrix([[matrix([f(a,b,c,d),f(a,b,c,e)],[f(a,b,c,f),[f(a,b,c,g)]])]])]
matrix([a,b],[c,d]),matrix([e,f],[g,h]) =>
matrix([matrix([f(a,e),f(a,f)],[f(a,g),f(a,h)])
matrix([f(b,e),f(b,f)],[f(b,g),f(b,h)])],
[matrix([f(c,e),f(c,f)],[f(c,g),f(c,h)]),
matrix([f(d,e),f(d,f)],[f(d,g),f(d,h)])])
I don't know how useful this is, but I'm pretty sure it is intentional.
-s
On 6/1/06, Barton Willis <willisb at unk.edu> wrote:
>
>
> The documentation on outermap isn't as clear as it should be.