Created
October 6, 2016 15:44
-
-
Save Fasand/6d64c9b5b0bbc2f09705de8b27d4037b 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
contains phrase word = word `elem` [take (length word) (drop x phrase) | x <- [0..(length phrase - length word)]] | |
contains phrase word = True `elem` [word `isPrefixOf` drop n phrase | n <- [0..(length phrase - length word)]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment