History of Idiom 77 > diff from v22 to v23
Edit summary for version 23 by hrschueler:
[Haskell] Clarified on immutability
[Haskell] Clarified on immutability
↷
Version 22
2018-05-15, 17:38:11
Version 23
2018-05-15, 17:40:17
Idiom #77 Complex number
Declare a complex x and initialize it with value (3i - 2). Then multiply it by i.
Idiom #77 Complex number
Declare a complex x and initialize it with value (3i - 2). Then multiply it by i.
Comments bubble
As prefix negation in Haskell is tricky, I've used (0 - 2) for (-2).
Comments bubble
As prefix negation in Haskell is tricky, I've used (0 - 2) for (-2).
Haskell variables are immutable, therefore "multiply it by two" is both unnecessary and too complicated.