Hello L.,

Sunday, August 27, 2006, 12:43:24 PM, you wrote:

>   length s `seq` writeFile f ("hello"++s)

  length mates_str `seq` return ()

it's the same. i recommend you to use:

return $! tail mates_str

$! defined as

f$!x = x `seq` f x

'tail' should be slightly faster than 'len'

--
Best regards,
Bulat                            mailto:[EMAIL PROTECTED]

But you need to evaluate the result of readFile all the way to the end--you need to use a function that traverses the entire file contents. Otherwise the file will be left open to read the bit you haven't traversed. Hence length rather than tail.

John


_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to