These are chat archives for ramda/ramda

18th
Apr 2015
Raine Virta
@raine
Apr 18 2015 17:35
is there a better way to abstract some operation on each line? https://gist.github.com/abe62f31fcaaa2cc9bc0
Raine Virta
@raine
Apr 18 2015 17:42
trying to compose mapLines with lineLens.map and R.map
Raine Virta
@raine
Apr 18 2015 18:13
or does there exist a trick for writing it as unlines . map . lines so that you can pass a function to map there somehow?
Hardy Jones
@joneshf
Apr 18 2015 18:49
@jedschneider If I understand properly, you could take your lens as an argument:
var computed = function(getter) {
  return getter(background) * largerRatio - getter(container);
}
var widthLens = ...
var heightLens = ...
var bounding = {x: computed(widthLens), y: computed(heightLens)};
@raine i'm not sure what you're looking for.