News for hackers. Stuff that matters.
Re:JavaScript is Good, Actually by aldanor on Wednesday May 16, 2018 @08:16AM (#17081751)
You can't define a function via 'def' and pass it as an argument at the same time. You can do it via 'lambda' though (which doesn't require any indentation since it's just an expression), what's the problem with it?

    >>> (lambda f: lambda x: f(x) * 2)(lambda x: x + 1)(100)
    202
Re:JavaScript is Good, Actually by amelius on Wednesday May 16, 2018 @09:07AM (#17082045)
So the problem is that you can only inline expressions; you can't inline let-blocks (assignments), or multiple statements. The usefulness is very limited.