From 1ad66e37fd013eab65b2fb7b892289bdba9d1023 Mon Sep 17 00:00:00 2001 From: Dimitri Lozeve Date: Sun, 10 May 2020 18:01:37 +0200 Subject: [PATCH] Solve problem 5 task 1 --- Contest2020/Contest2020.dyalog | 3 +++ 1 file changed, 3 insertions(+) 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