Created
August 6, 2014 21:31
-
-
Save skatenerd/63cb48b49c7014c133ec to your computer and use it in GitHub Desktop.
fails to compile. i'm not sure why - shouldn't "d" just represent *any type*, so 999 is legal to put in there?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class WithInt c where | |
combinate :: Integral i => i -> c -> [(i,c,d)] | |
data Wut = Wut deriving (Show) | |
instance WithInt Wut where | |
combinate i w = if (i == 0) | |
then [] | |
else (i,w,999):combinate (i - 1) w | |
main = let l :: [(Int, Wut, Int)] | |
l = combinate 8 Wut | |
in putStrLn $ show $ l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment