Created
February 26, 2014 23:21
-
-
Save afternoon/9240927 to your computer and use it in GitHub Desktop.
Task 1 from West London Hack Night Feb 26 2014
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
import List | |
import String (toList, words, lines, length) | |
text = """Four loko cred dreamcatcher, blog cliche umami Cosby sweater before | |
they sold out bitters drinking vinegar. Keytar four loko occupy, gastropub | |
keffiyeh Pitchfork paleo. Small batch ennui irony pop-up narwhal tousled | |
sustainable meh Thundercats gastropub, bicycle rights Echo Park sartorial. | |
Next level hoodie seitan, scenester Portland 3 wolf moon Neutra master | |
cleanse art party. Pour-over yr distillery, McSweeney's chambray pickled | |
brunch salvia. Dreamcatcher Bushwick polaroid viral asymmetrical chia. Ennui | |
forage skateboard Shoreditch, umami master cleanse Thundercats 90's | |
scenester Cosby sweater keytar YOLO.""" | |
charCount = length | |
wordCount s = List.length (words s) | |
lineCount s = List.length (lines s) | |
main = plainText | |
("chars: " ++ (show (charCount text)) ++ "\n" ++ | |
"words: " ++ (show (wordCount text)) ++ "\n" ++ | |
"lines: " ++ (show (lineCount text))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment