lookupM k ((x,y):xys)
  | x == k = return y `mplus` lookupM k xys
  | otherwise = lookupM k xys
lookupM k ((x,y):xys)
  | x == k = return y `mplus` lookupM k xys
  | otherwise = lookupM k xys
lookupM k ((x,y):xys)
  | x == k = return y `mplus` lookupM k xys
  | otherwise = lookupM k xys