I liked the economy in this, and it builds the row of Pascal's triangle faster than using Lucas's method (which was my first solution). So I wrote my own version of this method which is a bit more annotated.
The penny is beginning to drop. There is an inferred 'return' after an arrow, so your arrow functions return an arrow function. To begin with I was trying to read it as a function of two variables, which of course is different.
Hi, szib
I've got to say that I struggle to understand this because of the way functions are being used as variables. I will have to look this up in the context of arrow functions.
I liked the economy in this, and it builds the row of Pascal's triangle faster than using Lucas's method (which was my first solution). So I wrote my own version of this method which is a bit more annotated.
The penny is beginning to drop. There is an inferred 'return' after an arrow, so your arrow functions return an arrow function. To begin with I was trying to read it as a function of two variables, which of course is different.
Hi, szib
I've got to say that I struggle to understand this because of the way functions are being used as variables. I will have to look this up in the context of arrow functions.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution