😀
Highlights
- Pro
Pinned Loading
-
gistfile1.hs
gistfile1.hs 1-- Make a pattern to match the consonants and vowels in a word where a cons is
2-- not "aeiou" or y preceded by a cons e.g., "happy" -> ("happy", "cvccv")
3wordDesc :: String -> (String, String)
4wordDesc str =
5(str, [corv (a,b,i) | (a,b,i) <- zip3 str (rotateR str) [0..len]])
-
gistfile1.hs
gistfile1.hs 1rotateR :: [a] -> [a]
2rotateR [x] = [x]
3rotateR xs = last xs : init xs
-
gistfile1.py
gistfile1.py 1def cons(self, i):
2"""cons(i) is TRUE <=> b[i] is a consonant."""
3if self.b[i] == 'a' or self.b[i] == 'e' or self.b[i] == 'i' or self.b[i] == 'o' or self.b[i] == 'u':
4return 0
5if self.b[i] == 'y':
-
gistfile1.hs
gistfile1.hs 1-- Make a pattern to match the consonants and vowels in a word where a cons is
2-- not "aeiou" or y preceded by a cons e.g., "happy" -> ("happy", "cvccv")
3wordDesc :: String -> (String, String)
4wordDesc str = (str, [corv (a,b,i) | (a,b,i) <- zip3 str (rotateR str) [0..len]])
5where len = length str - 1
-
gistfile1.hs
gistfile1.hs 1rotateR :: [a] -> [a]
2rotateR [x] = [x]
3rotateR xs = last xs : init xs
-
gistfile1.hs
gistfile1.hs 1rotateR :: [a] -> [a]
2rotateR [x] = [x]
3rotateR xs = last xs : init xs
45-- Make a pattern to match the consonants and vowels in a word where a cons is
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.