Skip to content

Commit

Permalink
Update 文字列が数値を表すか判定する.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nobsun authored May 3, 2017
1 parent baf6c60 commit 07b40e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 文字列/文字列が数値を表すか判定する.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import qualified Data.Text.Read as T (decimal, hexadecimal, signed, double)
isDecimal :: Text -> Bool
isDecimal = either (const False) (T.null . snd) . T.signed T.decimal

-- | 整数16進表記(接頭辞``0x``があってもよい)か
-- | 整数16進表記か
isHexadecimal :: Text -> Bool
isHexadecimal = either (const False) (T.null . snd) . T.signed T.hexadecimal

Expand All @@ -53,7 +53,7 @@ isDecimal' s = bool (null $ snd $ head rs) False (null rs)
where
rs = readSinged readDec s

-- | 整数16進表記(接頭辞``0x``には非対応)か
-- | 整数16進表記か
isHexadecimal' :: String -> Bool
isHexadecimal' s = bool (null $ snd $ head rs) False (null rs)
where
Expand Down

0 comments on commit 07b40e5

Please sign in to comment.