Post History
Use lambdas instead of functions At most times, lambdas tend to make smaller code, which is helpful in golfing. Assigning a lambda is easy, just do: lambda f:whatever There are many answers th...
Answer
#1: Initial revision
# Use `lambda`s instead of functions At most times, `lambda`s tend to make smaller code, which is helpful in golfing. Assigning a `lambda` is easy, just do: ``` lambda f:whatever ``` There are many answers that uses this strategy (I don't use it). Here are some examples: - [Make $2 + 2 = 5$](https://codegolf.codidact.com/posts/283770/283779#answer-283779) - [My house is destroyed! Can you make me one?](https://codegolf.codidact.com/posts/283751/283753#answer-283753) - [Reduce over the range [1..n]](https://codegolf.codidact.com/posts/283268/283277#answer-283277)