logoalt Hacker News

Tiberiumtoday at 2:44 AM1 replyview on HN

I find such "X in Y lines of code" challenges not very interesting most of the time, because, as it is the case here, they usually just pack multiple lines into one instead of using clever tricks, from one of the lines in that file:

> right, left = lambda f: lambda x, y: list(map(lambda yi: f(x, yi), y)) if not atom(y) else f(x, y), lambda f: lambda x, y: list(map(lambda xi: f(xi, y), x)) if not atom(x) else f(x, y)


Replies

ofalkaedtoday at 8:59 AM

I think the challenge was actually to do something like Whitney style C in Python, doing it in under 100 lines was more a part of the metric than the goal. I am not sure I would call it a success but I don't know Python well enough to judge.