Skip to content
Quebra uma funcao construtora dentro de uma funcao curry que pode ser chamado com os mesmos argumentos retornanto o mesmo tipo
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore
README.md
bower.json
curry.js
gulpfile.js
package.json
script.txt

README.md

$curry

Quebra uma funcao construtora dentro de uma funcao curry que pode ser chamado com os mesmos argumentos retornanto o mesmo tipo. Essas combinacoes utiliza um undefined para espedificar gaps dentro da funcao curry, permitindo a aplicacao parcial de qualquer combinacao de argumentos independentes de suas posicoes

this.Ninja.module('$add', ['$curry'], function ($curry) {
  return $curry(function (a, b) {
    return a + b;
  });
});

this.Ninja(['$add'], function ($add, _) {
  ['bom dia', 'boa tarde', 'boa noite'].map($add(_, ' cleber.programmer'));
});
Something went wrong with that request. Please try again.