Ok, So isEmpty check is replaced by having an initial value as parameter of fold. case for 1 or more is handled by lambda. I think I understand it now. So those check-steps are not needed anymore.
acc will be initialized as empty setOf string because that is what is passed inside fold(), c will be current iterated value. and then you call combineSolutions with acc and mapPin of c.
One of the most salient features of our Tech Hiring culture is that there is so much bullshit. Everyone knows this. Each of us contributes his share. But we tend to take the situation for granted.
Ok, So
isEmptycheck is replaced by having an initial value as parameter of fold. case for 1 or more is handled by lambda. I think I understand it now. So those check-steps are not needed anymore.accwill be initialized as empty setOf string because that is what is passed inside fold(),cwill be current iterated value. and then you callcombineSolutionswith acc and mapPin of c.Man lambdas are trippy.
Exactly 👏🏻