Solve problem 10

This commit is contained in:
Dimitri Lozeve 2020-05-09 14:15:08 +02:00
parent 2ec19672f5
commit 78f1d367fb

View file

@ -17,4 +17,6 @@
zigzag←∧/2=∘|2-/∘×2-/(10∘⊥⍣¯1) zigzag←∧/2=∘|2-/∘×2-/(10∘⊥⍣¯1)
⍝ 9: Rise and Fall ⍝ 9: Rise and Fall
risefall←{∧/(⍳∘≢≡⍋)¨(⊂((⊢⍳⌈/)↑⊢),⍵),⊂⌽((⊢⍳⌈/)↓⊢),⍵} risefall←{∧/(⍳∘≢≡⍋)¨(⊂((⊢⍳⌈/)↑⊢),⍵),⊂⌽((⊢⍳⌈/)↓⊢),⍵}
⍝ 10: Stacking It Up
stacking←{↑⊃,/↓¨⍕¨⍵}
:EndNamespace :EndNamespace