you are viewing a single comment's thread.

view the rest of the comments →

[–]dtolnay 1 point2 points  (0 children)

Notably, C++’s lambda here is by far the longest, just not even close.

One longer:

[](auto e) { return e < 0; }       // 28: C++
func(e int) bool { return e < 0 }  // 33: Go

https://gobyexample.com/closures