Re: hyperoperators and multi-dimensional datastructures

2005-05-20 Thread Anthony Heading
Uri Guttman wrote: i can't spit out the syntax but here is the conceptual way i would do it. we do have multidimensional slices so we could grab each slice (maybe with zip?) and pass that to [+] and then grab the list of results back into a array/matrix with one less dimension than the original. Yu

hyperoperators and multi-dimensional datastructures

2005-05-19 Thread Anthony Heading
Is there a way to target hyperoperators at different axes of a multi-dimensional array? This is an attractive feature of various APL-like languages, viz. e.g. in J: a =. 2 5 $ i. 7 - a simple 2-by-5 array a 0 1 2 3 4 - like this 5 6 0 1 2 +/"1 a - sum reduc

ordered associative arrays?

2003-11-27 Thread Anthony Heading
Hi, From what I can understand of the parrot internals docs, the native data structures correspond closely to perl in that there are scalars, arrays and hashes. I think perl5 is weaker for the lack of an ordered map type - and e.g. the C++ STL would lend some support to the idea that that is