-
-
Save bradclawsie/9635497 to your computer and use it in GitHub Desktop.
substring
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
substring a b = ss a b | |
where | |
ss (x:xs) (y:ys) = if (x == y) then ss xs ys else substring a ys | |
ss (x:xs) _ = False | |
ss _ _ = True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment