Created
September 27, 2010 06:05
-
-
Save jglass/598683 to your computer and use it in GitHub Desktop.
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
removeFst :: Int -> [Int] -> [Int] | |
removeFst m xs = mvOne m xs [] | |
mvOne :: Int -> [Int] -> [Int] -> [Int] | |
mvOne m [] ys = mvAll [] ys | |
mvOne m (x:xs) ys | m /= x = mvOne m xs (x : ys) | |
| m == x = mvAll xs ys | |
mvAll :: [Int] ->[Int] -> [Int] | |
mvAll [] ys = reverse ys | |
mvAll (x:xs) ys = mvAll xs (x : ys) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment