New answers tagged

0

Not all languages allow the sort of formatting that is permitted by Javascript and Python. For example in Haskell which does not have a way to start a function on a newline without significantly modifying the behavior of the compiler I add an extra assignment to the body f= but remove it from my answer and the byte count. Haskell, 7 bytes map(+1) Try it ...


1

In Javascript, you can put f= into the header, the lambda in the body, and then call f in the footer to test: JavaScript (Node.js), 6 bytes x=>x+1 Try it online! In Python, you can put f=\ into the header and then do the same (you need the backslash to escape the newline): Python 3, 12 bytes lambda x:x+1 Try it online!


2

Yes - I think that new language should be allowed to win. The initial intention of language itself is to provide smooth way to express, simplify, shorten, improve how code or communication looks like. If language itself takes a fresh approach on how to better adapt to problem, context, program - that should be encouraged, not rejected. However - creating new ...


Top 50 recent answers are included