
13 Oct
2010
13 Oct
'10
11:27 p.m.
If you just want instances of questions you can keep it simple. How about something isomorphic to data Instance = Instance { question : String, answer : String, check : String -> Bool } You could make helper functions similar to your old code, like addition : (Int , Int) -> Instance You might handle problem families by taking a random number generator, or maybe using QuickCheck's Gen monad. easyMultiplication : Gen Instance