These are chat archives for ramda/ramda

Apr 2015
Scott Sauyet
Apr 19 2015 20:53

@jedschneider: Expanding on what @joneshf said, since you only need to get the property, you can use R.prop, like this:

var computed = function(getter) {
  return getter(background) * largerRatio - getter(container);
var bounding = {x: computed(R.prop('width')), y: computed(R.prop('height'))};

I'm not sure how much that really helps, but if you can find a more useful name than "computed", then this might make some code clearer.