Skip to content

Commit c84c4a2

Browse files
committed
Converted identation
Master is now for function caching.
1 parent 0804baf commit c84c4a2

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

cachematrix.R

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ CachedOps <- setRefClass("CachedOps",
1515
methods = list(
1616
initialize = function(...,func){
1717
cache <<- NULL
18-
func <<- function(){
19-
func(...)
20-
}
18+
func <<- function(){
19+
func(...)
20+
}
2121
callSuper()
2222
},
2323

@@ -30,16 +30,16 @@ Once it was calculated result is cached and returned in any consecutive call"
3030
)
3131

3232
makeCacheMatrix <- function(..., func = solve) {
33-
# Creating new caching object
34-
# Args:
35-
# func - function, result of calculation is need to cache
36-
# ... - parameters for function calling
33+
# Creating new caching object
34+
# Args:
35+
# func - function, result of calculation is need to cache
36+
# ... - parameters for function calling
3737
CachedOps$new(..., func = func)
3838
}
3939

4040
cacheSolve <- function(x, ...) {
41-
# Calculating result of function on matrix
42-
# once it was calculated result is cached
43-
# and returned in any consecutive call
41+
# Calculating result of function on matrix
42+
# once it was calculated result is cached
43+
# and returned in any consecutive call
4444
x$getResult()
4545
}

0 commit comments

Comments
 (0)