Closed ivanperez-keera closed 6 years ago
The following code:
let mayInf = find (Infected==) aInfs if isJust mayInf then return (Infected, Just ()) else return (Susceptible, Nothing)
is the same as the simpler:
if any (Infected ==) aInfs then return (Infected, Just ()) else return (Susceptible, Nothing)
See: https://github.com/thalerjonathan/phd/blob/d113e8d15e2b524e8169f40bc8cf1e7631d5649e/coding/papers/FrABS/Haskell/SIRDunai/src/Main.hs#L93--L96
EDIT: Moves link below. Adds complete code quote to description.
Thanks! Have changed it.
The following code:
is the same as the simpler:
See: https://github.com/thalerjonathan/phd/blob/d113e8d15e2b524e8169f40bc8cf1e7631d5649e/coding/papers/FrABS/Haskell/SIRDunai/src/Main.hs#L93--L96
EDIT: Moves link below. Adds complete code quote to description.