Hello,

is it possible to make code bellow point-free?

is it possible to make code bellow point-free?

`const containsAll = R.curry((xs, ys) => R.compose(R.isEmpty, R.difference)(xs, ys))`

I think you can just use

`const containsAll = R.compose(R.isEmpty, R.difference);`

@murmox yes, but you can't use currying then...

```
containsAll(xs, ys) // ok
containsAll(xs)(ys) // error
```

Would this not work?

`const containsAll = R.curry(R.compose(R.isEmpty, R.difference))`

@murmox yes it works :) thanks

@tommmyy No problem :)

polyPascal :smile:

```
const polyPlus = (xs, ys) => {
if(xs.length === 0) return ys
else if(ys.length === 0) return xs
const [f, ...fs] = xs
const [g, ...gs] = ys
return [f+g, ...polyPlus(fs, gs)]
}
const polyMult = (xs, ys) => {
if(xs.length && ys.length) {
const [f, ...fs] = xs
const [g, ...gs] = ys
return [f*g, ...polyPlus(polyMult([f], gs), polyMult(fs, ys))]
}
return []
}
const polyExp = (xs, n) => Array.from({length: n}, () => xs).reduce(polyMult, [1, 1])
const polyPascal = compose(map(n => polyExp([1,1], n)), range(0))
polyPascal(4)
```

What function would I use thats comparable to Elm's mapN functions? http://package.elm-lang.org/packages/elm-lang/core/5.1.1/List#map2

Oh wow! I couldn’t wrap my head around lift, is that all it is?

just combines Lists using a function?

Well in the case of Array/List yes

cool thanks

What other cases are there?

Wait. Maybe it's not the same

`map2`

works pair-wise
@Ben52 I was wrong. I'm not sure what the answer is

Still can’t grok

`lift`

@Ben52 my bad.

`lift`

works like `map{n}`

for other `Apply`

s. Not for `List`

/`Array`

though
Like

`Maybe`

or `Result`

forgive me for asking, but how do I create a Maybe or Result in JS?

You'd need a lib that has them

https://github.com/ramda/ramda-fantasy works w/ Ramda

But I don't think it's actively developed

https://github.com/origamitower/folktale should work too