Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on What I Wish I Knew When Learning Haskell 2.0. Parent comment
data Inches = MkInches Double deriving (Eq,Show)
(MkInches u) \+/ (MkInches v) = MkInches ( u + v )
from_inches_to_cm vin = MkCm (vin_as_pure_double * 2.54) where (MkInches vin_as_pure_double) = vin
inchToCm (MkInches x) = MkCm (x * 2.54)
Besides these fairly trivial mistakes there are simply better approaches for dealing with units.
There are no comments on this comment yet.
Besides these fairly trivial mistakes there are simply better approaches for dealing with units.