Rav <
Pa...@cais.com> writes:
>Hi, Charles. While I happen to agree with you that disclose is
>preferable (since the intent is to remove a level of nesting, and not
>take the "first" element), and that's why I used it, at least in APL+Win
>and NARS2000 {take}3 4{rho}'asdfasdfasdf' does work (returns 'a'). I
>don't know about Dyalog or others.
In Dyalog there is the migration level. If you are using migration
levels greater than 2, then I am not sure what using {take} would do,
but I think it would have the effect of being a first or disclose
operation and would work on 3 4⍴⍳12 for example. However, with migration
levels below 2, which is the default, ↑3 4⍴⍳12 gives you the same
thing back, while ⊃3 4⍴⍳12 gives you 1. I think this is because
the {take} function in migration level 0 flattens out a list that is
nested. That is, (⍴↑3 4⍴⊂⍳12)≡3 4 12.
--
Aaron W. Hsu |
arc...@sacrideo.us |
http://www.sacrideo.us
Programming is just another word for the lost art of thinking.