Cachematrix

Cache matrix  using lexical scoping