fix solveCache to accept function as input

Make solveCache to accept makeCacheMatrix as direct input