Created
November 1, 2017 17:01
-
-
Save NotTheEconomist/11ebc9630e6c01ec800513071d6ad421 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
everyOther :: [a] -> [a] | |
everyOther xs = [v | (k,v) <- zip (cycle [True, False]) xs, k] | |
betweenAF :: String -> Bool | |
betweenAF = all (flip elem ['a'..'f']) . everyOther |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment