Skip to content

Commit 358f9a0

Browse files
authored
Merge pull request #24 from anttih/newtype
Add runRational
2 parents 1beeff8 + a9dc7ed commit 358f9a0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Data/Rational.purs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ import Data.Ratio (Ratio(Ratio))
1313

1414
newtype Rational = Rational (Ratio Int)
1515

16+
runRational :: Rational -> Ratio Int
17+
runRational (Rational ratio) = ratio
18+
1619
instance showRational :: Show Rational where
1720
show (Rational (Ratio a b)) = show a <> " % " <> show b
1821

0 commit comments

Comments
 (0)