Hi @ all! I have a big problem. i have a list of variables and now i need something like this
fillArray ["a"] should be something like this: [[("a",True)],[("a",False)]] fillArray ["a","b"] [[("a",True),("b",True)],[("a",False),("b",True)],[("a",True),("b",False)], [("a",False),("b",False)]] and so on. i tried many things, and i dont know how to solve this. allthesame vars = [(alltrue [] vars)] ++ [(allfalse [] vars)] alltrue liste [] = liste alltrue liste (x:xs) = alltrue (liste ++ [(x,True)]) xs allfalse liste [] = liste allfalse liste (x:xs) = allfalse (liste ++ [(x,False)]) xs this works, but whats with the rest :) it would be very nice, if somebody could help me. thank you Andreas _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell