Estou louco? Código R realmente parece Javascript?

Decidi aprender a programar com R. Aqui está algo que escrevi.

## defining a function
makeCacheMatrix <- function(x = matrix()) {
  ## internal state
  inv <- NULL

  ## defining some closures
  set <- function(y) {
    x <<- y
    inv <<- NULL
  }
  get <- function() x
  setinverse <- function(inverse = matrix()) inv <<- inverse
  getinverse <- function() inv
  
  ## returning functions as an object 
  list(
     set = set, 
     get = get, 
     setinverse = setinverse, 
     getinverse = getinverse
  )
}

Estou mesmo louco? Isso realmente lembra Javascript! Você concorda?

Compartilhe este insight:

Elemar Júnior

Sou fundador e CEO da EximiaCo e atuo como tech trusted advisor ajudando diversas empresas a gerar mais resultados através da tecnologia.

Elemar Júnior

Sou fundador e CEO da EximiaCo e atuo como tech trusted advisor ajudando diversas empresas a gerar mais resultados através da tecnologia.

Mais insights para o seu negócio

Veja mais alguns estudos e reflexões que podem gerar alguns insights para o seu negócio:

Outro dia, tive o prazer de trocar ideias com um pessoal super interessante sobre microsserviços. Esse bate-papo ficou registrado em...
“Microservices” is a trending topic. Big companies are trying to associate their technologies with this concept – but, it is...
Um dos benefícios mais bacanas do programa MVP é o direito a participação no MVP Global Summit – evento anual,...
In the previous post, I asked which function, in the following code, would fill the array with 1’s faster and...
Mudança nunca é fácil. Em uma organização, então, este tema costuma ser algo bem complicado. A execução da estratégia implica...
[tweet]Aprenda comigo técnicas de modelagem de bancos de dados de documentos NoSQL e a utilizar o RavenDB[/tweet] – um dos...