Skip to content
Advertisement

Tag: ramda.js

How can I make Underscore behave like Ramda?

Two days ago, I announced a preview release of Underscore that integrates with the new Node.js way of natively supporting ES modules.1 Yesterday, somebody responded on Twitter with the following question: Can you do Ramda-style data last functions? He or she was referring to one of the main differences between Underscore and Ramda. In Underscore, functions typically take the data

Ramda Curry with Implicit Null

I’ve been trying to learn the Ramda library and get my head around functional programming. This is mostly academic, but I was trying to create a nice logging function that I could use to log values to the console from within pipe or compose The thing I noticed Once you’ve curried a function with Ramda, invoking a function without any

Rename keys with ramda js

expected output: I’m thinking the renamed keys are defined in an object (but fine if there’s a better way to map them): How can I do this with Ramda? Something with R.map Answer There is an entry in Ramda’s Cookbook for this: But with the ubiquity of ES6, it’s pretty easy to write this directly:

Advertisement