Just some remarks:
difference = length . filter (==False) . uncurry (zipWith (==))
Maybe
difference = length . filter id . uncurry (zipWith (/=))
or even
difference w = length . filter id . zipWith (/=) w
and defer the call of uncurry. We then have
keepOneDiff = filter ((< 2) . uncurry d
The following is a slap-dash program for generating a list of pairs of
words which differ by, at most, one letter. It's quite verbose at the
moment, because (a) that was the way I wrote it, a snippet at a time,
and (b) I lack the wit to make it shorter.
Can anyone recommend ways to make this prog