What’s the difference? Does seq guarantee more flow conditions?
What’s the difference? Does seq guarantee more flow conditions?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
They aren’t related at all.
seqhas the type:It is used (as
seq a b, ora `seq` b) to evaluateato head normal form, which is a fancy way of saying that it forces the lazy valueato be evaluated a little bit. It has nothing to do with monads.>>=is for sequencing monads. It has the type:It is used to get the value from a monadic value and pass it to a function that returns another monadic value. Basically something like:
which would get a string of input from the command-line and then print it out.
So, basically, no relation at all.