Side note: it's not very clear what you're trying to accomplish, but you may be better served by using array semantics. I sketched a quick and dirty code snippet in a hurry, feel free to clean it up and make it well-typed: https://gist.github.com/dserban/10370136 After loading it in GHCi, you can do: λ: getCellAt (1,1) True λ: getCellAt (-1,1) False