Created
October 19, 2010 02:59
-
-
Save jb55/633533 to your computer and use it in GitHub Desktop.
This file contains 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
rInt :: String -> Int | |
rInt = read | |
count :: String -> Int | |
count [] = 1 | |
count (a:[]) = 1 | |
count (a:b:c) = count (b:c) + twice | |
where | |
twice = if isValid (a:b:[]) then count c else 0 | |
isValid s = (rInt s) < 27 |
Author
jb55
commented
Oct 19, 2010
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment