Created
September 7, 2017 15:44
-
-
Save raichoo/d33d44bd8407211859e9bac14cd26e36 to your computer and use it in GitHub Desktop.
Data.Text rewrite rules fun.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import Prelude hiding (length, filter) | |
import Data.Text | |
-- Turn on optimizations (-O) to make this `False` | |
wat :: Text -> Bool | |
wat x = length (filter (== ',') x) == 1 | |
main :: IO () | |
main = print (wat "0,00") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment