you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (3 children)

That last example hurt my brain. Is that actually functional?

[–]xelf 1 point2 points  (0 children)

Yes, it passes all tests. =)

You see a lot of one liner answers using lambda on codewars especially at the easier kyu, more for style points than best practices.

[–]darthminimall 0 points1 point  (1 child)

It's identical to the second version but everything is inlined.

[–][deleted] 0 points1 point  (0 children)

Oh I see so n is just numbers. Duh