Skip to content

Commit be9d124

Browse files
author
Joel M
committed
final revision
1 parent 0d22d72 commit be9d124

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cachematrix.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,16 @@ makeCacheMatrix <- function(x = matrix()) {
3232
cacheSolve <- function(x, ...) {
3333
## This function assume that the matrix supplied is
3434
## always invertible.
35+
3536
im <- x$getmatrix()
3637
if(!is.null(im)){
38+
message("Getting cached data..")
3739
return (im)
3840
}
39-
m <- x$get()
41+
m <- x$get()
4042
im <- solve(m, ...)
4143
x$setmatrix(im)
44+
4245
## Return a matrix that is the inverse of 'x'
4346
im
4447
}

0 commit comments

Comments
 (0)