Skip to content

Commit 0a49124

Browse files
authored
Merge pull request #22 from texastoland/patch-1
Add base36
2 parents d22c719 + 43a2b56 commit 0a49124

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Data/Int.purs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ module Data.Int
1111
, octal
1212
, decimal
1313
, hexadecimal
14+
, base36
1415
, fromStringAs
1516
, toStringAs
1617
, even
@@ -114,6 +115,10 @@ decimal = Radix 10
114115
hexadecimal :: Radix
115116
hexadecimal = Radix 16
116117

118+
-- | The base-36 system.
119+
base36 :: Radix
120+
base36 = Radix 36
121+
117122
-- | Create a `Radix` from a number between 2 and 36.
118123
radix :: Int -> Maybe Radix
119124
radix n | n >= 2 && n <= 36 = Just (Radix n)

0 commit comments

Comments
 (0)