aboutsummaryrefslogtreecommitdiff
path: root/challenge-079/richard-park/apl/ch-2.aplf
blob: 33400056fc75640e79aae33a37abf9d31a3fb951 (plain)
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 ⍵
 }