File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -15,9 +15,9 @@ CachedOps <- setRefClass("CachedOps",
15
15
methods = list (
16
16
initialize = function (... ,func ){
17
17
cache <<- NULL
18
- func <<- function (){
19
- func(... )
20
- }
18
+ func <<- function (){
19
+ func(... )
20
+ }
21
21
callSuper()
22
22
},
23
23
@@ -30,16 +30,16 @@ Once it was calculated result is cached and returned in any consecutive call"
30
30
)
31
31
32
32
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
37
37
CachedOps $ new(... , func = func )
38
38
}
39
39
40
40
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
44
44
x $ getResult()
45
45
}
You can’t perform that action at this time.
0 commit comments