
23 Apr
2009
23 Apr
'09
9:45 a.m.
Hi, I'd like to lazily generate the set of all {-1,0,1}-valued functions on {'a','b','c'}? How should I best approach this. I was thinking about generalizing the power set definition powerset :: [a] -> [[a]] powerset = filterM (const [True, False]) but clearly don't know enough about filterM and the like to do it this way. Erik