yellowbean / Hastructure

ABS/MBS cashflow engine written in Haskell, with API to Python and C/Java (on the way)
https://deal-bench.xyz
Other
16 stars 4 forks source link

Review `IsMostSenior` predicate #123

Closed yellowbean closed 10 months ago

yellowbean commented 10 months ago
IsMostSenior bn bns ->
  let 
    bn1:bns1 =  (bndMap Map.!) <$> (bn:bns)
  in
    case (isPaidOff bn1,all isPaidOff bns1) of
      (False,True) -> True
      _ -> False

Currect logic should be