Quoth Jonathan Cast <[email protected]>:
> You can certainly use let:
>
> reader <- forkIO $ let loop = do
> (nr', line) <- readChan chan'
> when (nr /= nr') $ hPutStrLn hdl line
> loop
> in loop
>
> But the version with fix is clearer (at least to people who have fix in
> their vocabulary) and arguably better style.
Would you mind presenting the better style argument? To me, the
above could not be clearer, so it seems like the version with fix
could be only as clear, at best.
Thanks,
Donn cave
PS - granted that "forever" is a fine alternative to either, I suppose
it doesn't affect the style comparison above.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe