Tips for golfing in APL I started one code golf challenge recently and it seems like the winner is GolfScript (surprise, surprise!). What's interesting is that there was another very strong competitor that had all chances to win over GolfScript. Its name is APL. I see a lot of answers written in APL here. It seems like this language is fairly efficient for code golfing, so I decide to ask for any code golfing tips you know for APL programs. Feel free to post some code examples. It is usually very interesting to see language in action.
Edit: for people reading this who don't  know APL at all but want  to take it up, Mastering Dyalog APL is a very good resource.

Evaluation is strictly right-to-left. This includes setting variables, so take advantage of it.
2+a, 1+a←1  -&gt; 3 4
a is set to 1, 1+a evaluates to 2, a,2 evaluates to 1 2 and 2+1 2 evaluates to 3 4.

Like C, ← can be combined with a function, i.e. a +← 3. Unlike C, this is generic: foo F← bar sets foo to F bar. Somewhat unintuitively, as an expression this returns bar, not F bar.
It works with anonymous functions too:
       a←0
       a+←3 ⋄ a
 3
       a+←3 ⋄ a
 6
       a { ⍵/'!' } ←4 ⋄ a
 !!!!


You can assign to an array: A[3]←8, like you'd expect. But you can also assign multiple items at the same time: A[3 5 6]←9 1 4, or even A[3 5 6]←9, setting them all to the same item. You can, of course, add a function to the ← here too. The  function will then be applied to each element separately, as if you did F¨.

⍨ is your friend, even if he doesn't look too happy about it.
1. If `F` is dyadic, dyadic `⍨` switches the arguments: `a F b` &lt;-&gt; `b F⍨ a`. This comes in handy when golfing because it can save you from using braces:

     (F G H x) K y      &lt;-&gt;     y K⍨ F G H x

This does change the evaluation order, as the right hand is always evaluated before the left hand. 

2. If `F` is dyadic, *monadic* `⍨` applies the same argument to both sides of the function:

           5⍴5
     5 5 5 5 5
           ⍴⍨5
     5 5 5 5 5

   The argument is only evaluated once. This particularly comes in handy with outer products, i.e. to compare each value in an array with the other values in the same array, you can use `∘.=⍨` instead of having to do `x∘.=x←(whatever)`.

3. If `F` is monadic, `⍨` does nothing, but it does separate the function from the argument. So it can still save you braces if the function is complex:

           {⍵+3}⍣5 6
           ∇{⍵+3}              
          ∇ ⍣ 5 6              
           ({⍵+3}⍣5)6
     21
           {⍵+3}⍣5⍨6
     21


Learn the idioms! Then golf the idioms. For example:
 ((((1↑⍴X),⍴Y)↑X)^.=Y)⌿X

can be mechanically transformed into:
 X⌿⍨Y^.=⍨X↑⍨(1↑⍴X),⍴Y

and then further into:
 X⌿⍨Y^.=⍨X↑⍨(⊃⍴X),⍴Y

⊃ (first) being equivalent to 1↑ (take one) in this case. And possibly:
 X⌿⍨Y^.=⍨X↑⍨(≢X),⍴Y

≢ (tally) being equivalent to ⊃⍴ (the first element of the shape) for all but scalars.