ramda#curry TypeScript Examples

The following examples show how to use ramda#curry. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Flickr.tsx    From react-js-tutorial with MIT License 6 votes vote down vote up
Impure = {
  getJSON: curry((callback, url) => $.getJSON(url, callback)),
  setHtml: curry((sel, html) => $(sel).html(html)),
  trace: curry((tag, x) => {
    // eslint-disable-next-line no-console
    console.log(tag, x);
    return x;
  }),
}
Example #2
Source File: RefactoredFlickr.tsx    From react-js-tutorial with MIT License 6 votes vote down vote up
Impure = {
  getJSON: curry((callback, url) => $.getJSON(url, callback)),
  setHtml: curry((sel, html) => $(sel).html(html)),
  trace: curry((tag, x) => {
    // eslint-disable-next-line no-console
    console.log(tag, x);
    return x;
  }),
}
Example #3
Source File: 4_Curring.ts    From react-js-tutorial with MIT License 5 votes vote down vote up
match = curry((what, s) => s.match(what))
Example #4
Source File: 4_Curring.ts    From react-js-tutorial with MIT License 5 votes vote down vote up
replace = curry((what, replacement, s) =>
  s.replace(what, replacement)
)
Example #5
Source File: 4_Curring.ts    From react-js-tutorial with MIT License 5 votes vote down vote up
filter = curry((f, xs) => xs.filter(f))
Example #6
Source File: 4_Curring.ts    From react-js-tutorial with MIT License 5 votes vote down vote up
map = curry((f, xs) => xs.map(f))