Re: [Haskell-cafe] Mo' comprehensions

2006-12-31 Thread Bulat Ziganshin
Hello Diego, Saturday, December 30, 2006, 6:05:46 PM, you wrote: Maybe there should be a Comprehensible class that's automatically mapped to comprehension syntax. It's rather odd to have them only for lists. That would be both more general and more elegant than just bringing back monad

[Haskell-cafe] Mo' comprehensions

2006-12-30 Thread Diego Navarro
I was solving some programming puzzles today[1], and found myself pining for Map comprehensions. Maybe there should be a Comprehensible class that's automatically mapped to comprehension syntax. It's rather odd to have them only for lists. That would be both more general and more elegant than

Re: [Haskell-cafe] Mo' comprehensions

2006-12-30 Thread Lennart Augustsson
What would the Comprehensible class have? And how would it be different from Monad(Zero)? -- Lennart On Dec 30, 2006, at 10:05 , Diego Navarro wrote: I was solving some programming puzzles today[1], and found myself pining for Map comprehensions. Maybe there should be a

Re: [Haskell-cafe] Mo' comprehensions

2006-12-30 Thread Neil Mitchell
Hi I was solving some programming puzzles today[1], and found myself pining for Map comprehensions. [ ... (key,val) - fromList map, ... ] It isn't really that much more than a straight comprehension would be on a map. By default should a map comprehension let you inspect the values, or the