[Haskell-cafe] How to understand `|` in this code snippet ?
zaxis
z_axis at 163.com
Sat Feb 27 04:07:20 EST 2010
xxxMain = do
timeout <- getEnv "xxx_TIMEOUT"
case timeout of
Just str | [(t, _)] <- reads str -> do
addTimeout t (hPutStrLn stderr "*** TIMEOUT" >> _exit 1)
return ()
_ -> return ()
.......
What does the `|` mean in "Just str | [(t, _)] <- reads str" ?
Is it a logical `or` ?
Sincerely!
-----
fac n = let { f = foldr (*) 1 [1..n] } in f
--
View this message in context: http://old.nabble.com/How-to-understand-%60%7C%60-in-this-code-snippet---tp27726581p27726581.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
More information about the Haskell-Cafe
mailing list