Skip to content

Commit 204707c

Browse files
authored
Merge pull request #27 from Thorium/array-collect
Array map-concat to collect
2 parents 9595df8 + c7bd759 commit 204707c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Refinancing.fs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ module Refinancing =
156156
|> Array.map (fun si -> si.Day, si.ScheduledPayment)
157157
| FixedSchedules fixedSchedules ->
158158
fixedSchedules
159-
|> Array.map (fun fs ->
159+
|> Array.collect (fun fs ->
160160
let scheduledPayment =
161161
match fs.ScheduleType with
162162
| ScheduleType.Original -> ScheduledPayment.quick (ValueSome fs.PaymentValue) ValueNone
@@ -174,7 +174,6 @@ module Refinancing =
174174
fs.UnitPeriodConfig
175175
|> Array.map (fun d -> OffsetDay.fromDate p.Basic.StartDate d, scheduledPayment)
176176
)
177-
|> Array.concat
178177
| CustomSchedule payments -> payments |> Map.toArray
179178

180179
// append the new schedule to the old schedule up to the point of settlement

0 commit comments

Comments
 (0)