For each item, we ignore what the item actually is (hence `const`), and say that we both want it (True) and don't want it (False) in the output. Since we are using the list monad we are allowed to say this, and the filter function gives us a list of lists. I think there's probably a more intuitive name for `filterM`... _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
- [Haskell-cafe] powerSet = filterM (const [True, False]... Thomas Hartman
- Re: [Haskell-cafe] powerSet = filterM (const [Tru... Luke Palmer
- Re: [Haskell-cafe] powerSet = filterM (const ... George Pollard
- Re: [Haskell-cafe] powerSet = filterM (const ... Sebastian Fischer
- RE: [Haskell-cafe] powerSet = filterM (co... Sittampalam, Ganesh
- Re: [Haskell-cafe] powerSet = filterM... Sebastian Fischer
- RE: [Haskell-cafe] powerSet = fi... Sittampalam, Ganesh
- Re: [Haskell-cafe] powerSet = fi... Ryan Ingram
- Re: [Haskell-cafe] powerSet ... Jan Christiansen
- Re: [Haskell-cafe] powerSet = filterM (co... Felipe Lessa
- [Haskell-cafe] Re: powerSet = filterM (const [Tru... Gleb Alexeyev