
21 Jun
2011
21 Jun
'11
3:58 p.m.
Hello, My name is Anthony i have few question about Haskell. I was reading a tutorial everything goes well. but now i have few things that i dont understang. HERE: boomBangs xs = [ if x < 10 then "BOOM!" else "BANG!" | x <- xs, odd x] I dont understand this line except the "if" "then" "else". What is xs? what is the | ? and why doing this " | x <- xs, odd x]" why x <- xs????? what is that and what is odd x? thx everyone for answer me.