<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div>I wrote this code and Can it be less?<br>[2,4,5]
list&nbsp;is&nbsp;sub list of&nbsp;[3,7,<b>2,4,5</b>,9]&nbsp;list and return True but not&nbsp;of
[3,7,<b>4,2,5</b>,9] list ; return False<br><br>sublist :: Eq a =&gt; [a] -&gt; [a] -&gt; Bool<br>sublist [] _&nbsp;&nbsp;&nbsp;&nbsp; = True<br>sublist (_:_) []&nbsp;&nbsp; = False<br>sublist (x:xs) (y:ys)<br>&nbsp; | x == y&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&nbsp; if isEqual (x:xs) (y:ys) == False<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; then sublist (x:xs) ys<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else True<br>&nbsp; | otherwise&nbsp;&nbsp; = sublist (x:xs) ys&nbsp; <br><br><br>isEqual :: Eq a =&gt; [a] -&gt; [a] -&gt; Bool<br>isEqual [] _&nbsp;&nbsp;&nbsp;&nbsp; = True<br>isEqual (_:_) [] = False<br>isEqual (x:xs) (y:ys)<br>&nbsp; | x==y&nbsp;&nbsp;&nbsp; = isEqual xs ys<br>&nbsp; | otherwise&nbsp;&nbsp;&nbsp; = False <br></div></div><br>

      <hr size=1>Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile. <a href="http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ "> Try it now.</a></body></html>