Message from JavaScript discussions

May 2019

— TRGWII i am introducing my team to ramda by examples


What do you think about this:

// difference between arrays, we need what is included in first but not second!
const a = ['test1', 'test2', 'test3', 'test4']
const b = ['NOPE', 'test2', 'test3', 'test4']

const notIncludes = R.complement(R.includes)

R.filter(notIncludes(R.__, b), a)

— excludes

— But ehh

— Ramda has R.difference

— I'm Sure you know other languages than Javascript? Lool like Arabic . Same as me

— What do you mean?

— You do speak Arabic?

— Yes it was for example purpose

— Well, thanks. I got this now for the next example:

const a = ['test1', 'test2', 'test3', 'test4']
const b = ['test2']
const c = ['test1']

const differenceWithB = R.difference(R.__, b)
const differenceWithC = R.difference(R.__, c)

const notIncludesInBAndC = R.compose(differenceWithB, differenceWithC)


Message permanent page

— This is mind blowing for non-functional devs

— I would like to include more and maybe make some slides