>>> isInfixOf "Haskell" "I really like Haskell." True
>>> isInfixOf "Ial" "I really like Haskell." FalseFor the result to be True, the first list must be finite; for the result to be False, the second list must be finite:
>>> [20..50] `isInfixOf` [0..] True
>>> [0..] `isInfixOf` [20..50] False
>>> [0..] `isInfixOf` [0..] * Hangs forever *
>>> isInfixOf "Haskell" "I really like Haskell." True >>> isInfixOf "Ial" "I really like Haskell." FalseFor the result to be True, the first list must be finite; for the result to be False, the second list must be finite:
>>> [20..50] `isInfixOf` [0..] True >>> [0..] `isInfixOf` [20..50] False >>> [0..] `isInfixOf` [0..] * Hangs forever *
>>> prove $ \(l1 :: SList Integer) l2 l3 -> l2 `isInfixOf` (l1 ++ l2 ++ l3) Q.E.D. >>> prove $ \(l1 :: SList Integer) l2 -> l1 `isInfixOf` l2 .&& l2 `isInfixOf` l1 .<=> l1 .== l2 Q.E.D.
>>> prove $ \s1 s2 s3 -> s2 `isInfixOf` (s1 ++ s2 ++ s3) Q.E.D. >>> prove $ \s1 s2 -> s1 `isInfixOf` s2 .&& s2 `isInfixOf` s1 .<=> s1 .== s2 Q.E.D.