Skip to content

Instantly share code, notes, and snippets.

@bradclawsie
Created March 19, 2014 04:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradclawsie/9635497 to your computer and use it in GitHub Desktop.
Save bradclawsie/9635497 to your computer and use it in GitHub Desktop.
substring
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