On Wed, Aug 15, 2012 at 9:54 PM, Daniel Hlynskyi abcz2.upr...@gmail.comwrote:
Hello Cafe.
Consider code, that takes input from handle until special substring
matched:
matchInf a res s | a `isPrefixOf` s = reverse res
matchInf a res (c:cs) = matchInf a (c:res) cs
On 12-08-15 02:54 PM, Daniel Hlynskyi wrote:
Hello Cafe.
Consider code, that takes input from handle until special substring
matched:
matchInf a res s | a `isPrefixOf` s = reverse res
matchInf a res (c:cs) = matchInf a (c:res) cs
hTakeWhileNotFound str hdl = hGetContents
Hello Cafe.
Consider code, that takes input from handle until special substring matched:
matchInf a res s | a `isPrefixOf` s = reverse res
matchInf a res (c:cs) = matchInf a (c:res) cs
hTakeWhileNotFound str hdl = hGetContents hdl = return.matchInf str []
It is simple, but