summaryrefslogtreecommitdiff
path: root/libraries/base/tests/isSuffixOf.hs
blob: 787a69c33b6fa6531c7e4ac14627dcb7b08b4db2 (plain)
1
2
3
4
5
6
7
8
9
10
module Main (main) where
import Data.List (isSuffixOf)

needles = ["","1","2","12","123","1234"]
haystacks = ["","a","ab","abc","1","2","3","a1","1a",
             "23","123","a123","ab123","abc123"]

main :: IO()
main = mapM_ print $ [needle `isSuffixOf` haystack
                       | needle <- needles, haystack <- haystacks]