These are chat archives for ramda/ramda

2nd
Sep 2018
Asad Saeeduddin
@masaeedu
Sep 02 2018 09:07
@jdkschang I think you want to append these predicates together. They're not exactly composable
I needed something similar recently
a simple way of writing it is:
const p = R.lift(R.and)(x => x > 1)(x => x < 5)

const result = [0, 1, 2, 15].map(p)
result
// => [false, false, true, false]
Asad Saeeduddin
@masaeedu
Sep 02 2018 09:13
the R.and is itself just a special case of append for one of the monoids of booleans, but in most cases it's probably not worth getting that abstract
Ben Briggs
@ben-eb
Sep 02 2018 10:46
@masaeedu p can also be defined as:
allPass([
  x => x > 1,
  x => x < 5
])
Lawrence Wagerfield
@ljwagerfield
Sep 02 2018 16:05
Hi there, is it possible to use a fluent API with Rambda? E.g. R(data).map(..).flatMap(..)?
Rick Medina
@rickmed
Sep 02 2018 22:05
@ljwagerfield the functional equivalent is the pipe function