Skip to content

Instantly share code, notes, and snippets.

@CoderPuppy
Created August 2, 2016 21:16
Show Gist options
  • Save CoderPuppy/4d0f91873abef9de7323a375e1112e99 to your computer and use it in GitHub Desktop.
Save CoderPuppy/4d0f91873abef9de7323a375e1112e99 to your computer and use it in GitHub Desktop.
-- or maybe `metamethod`
instance Add Ratio where
add (Ratio x1 y1) (Ratio x2 y2) = Ratio ((x1 * y2) + (x2 * y1)) (y1 * y2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment