1 2 3 4 5 6 7 8
TrappedRainWater←{ +/⌈\-⊢ ⍝ Elegant train ⍝ +/⍵-⍨+/∨⍀⍵∘.≥⍳⌈/⍵ ⍝ From the video ⍝ +/ Sum of ⍝ ⍵-⍨ bottom of buckets ⍝ +/∨⍀ to top of buckets ⍝ ⍵∘.≥⍳⌈/⍵ in a histogram rep. of ⍵ }