In the type signature we include unnecessary parentheses, to be clear that we
are thinking of the function not as “a function taking a secret code and a
guess and returning a score for the guess” but as “a function taking a
secret code and returning a scoring function for that code”.
moduleMasterMindwhere-- the score is returned as ( x_correct_out_of , y_total) score::Eqa=>[a]->([a]->(Int,Int))scorec=flip(,)(lengthc).length.filterid.zipWith(==)cgame=score[4,3,5,0]