[Haskell-beginners] Mastermind

Frerich Raabe raabe at froglogic.com
Mon Mar 23 22:46:04 UTC 2015


Hi Mike,

On 2015-03-23 23:06, Mike Houghton wrote:
> I’m working through http://www.seas.upenn.edu/~cis194/hw/02-lists.pdf [1] - 
> the homework for the CIS 194 Haskell course.
> I ‘stuck’ on question 6!
> If anyone has done this I’d really appreciate a pointer to solving it.

Just thinking out loud:

Consider that to get all lists of length 2, you could add (e.g. prepend) each 
of the six colors to each of the lists of length 1. And to get each of the 
lists of length 1 you prepend each of the six colors to each of the lists of 
length 0.

Does that help? :-)

-- 
Frerich Raabe - raabe at froglogic.com
www.froglogic.com - Multi-Platform GUI Testing


More information about the Beginners mailing list