crossProduct2=concatMap.(.repeat).zipcrossProduct3=(.crossProduct2).(.).crossProduct2crossProduct4=(.crossProduct3).(.).(.).crossProduct2crossProduct5=(.crossProduct4).(.).(.).(.).crossProduct2crossProduct6=(.crossProduct5).(.).(.).(.).(.).crossProduct2crossProduct7=(.crossProduct6).(.).(.).(.).(.).(.).crossProduct2-- Test datadataRGB=Red|Green|Bluederiving(Bounded,Enum,Show)dataENWS=East|North|West|Southderiving(Bounded,Enum,Show)allItems::(Boundeda,Enuma)=>[a]allItems=[minBound..maxBound]test=crossProduct4(allItems::[()])(allItems::[Bool])(allItems::[RGB])(allItems::[ENWS]){-*Main> test[((),(False,(Red,East))),((),(True,(Red,East))),((),(False,(Green,East))),((),(True,(Green,East))),((),(False,(Blue,East))),((),(True,(Blue,East))),((),(False,(Red,North))),((),(True,(Red,North))),((),(False,(Green,North))),((),(True,(Green,North))),((),(False,(Blue,North))),((),(True,(Blue,North))),((),(False,(Red,West))),((),(True,(Red,West))),((),(False,(Green,West))),((),(True,(Green,West))),((),(False,(Blue,West))),((),(True,(Blue,West))),((),(False,(Red,South))),((),(True,(Red,South))),((),(False,(Green,South))),((),(True,(Green,South))),((),(False,(Blue,South))),((),(True,(Blue,South)))]-}
nobsun
#2178()
[
Haskell
]
Rating1/1=1.00
Rating1/1=1.00-0+
[ reply ]