diff --git a/Contest2020/Contest2020.dyalog b/Contest2020/Contest2020.dyalog index b32b5ce..7e53ff5 100644 --- a/Contest2020/Contest2020.dyalog +++ b/Contest2020/Contest2020.dyalog @@ -62,6 +62,9 @@ ⍝ 2020 APL Problem Solving Competition Phase II ⍝ Stub function for Problem 5, Task 1 - rr ⍝ Put your code and comments below here + ⍝ ((1+⊢)⊥⊣) computes the total return for a vector + ⍝ of amounts ⍺ and a vector of rates ⍵. + r←((↑∘amounts)((1+⊢)⊥⊣)(↑∘rates))¨⍳⍴rates ∇ ∇ r←cashFlow pv rates