These are chat archives for ramda/ramda

8th
Jan 2017
James Forbes
@JAForbes
Jan 08 2017 00:06

But I guess that breaks over.

Is there an existing type like a lens, but only supports get and set but for primitive values

Like an Isomorphism that's composable

You could have one for say, var json = Iso(parseJSON, JSON.stringify)or var pixels = Iso( v => v + 'px', s.replace('px','') ) or var number = Iso(s => parseInt(s, 10), n => n.toString)

And you could compose them. So compose(pixels, number)

AFortune
@AFortune
Jan 08 2017 19:09
Does anyone know of a good example of a solid rambda react app on github?
James Forbes
@JAForbes
Jan 08 2017 21:25
So ramda-lens had exactly what I wanted all this time: https://github.com/ramda/ramda-lens/blob/master/test/test.js#L134 :O