Skip to content

Instantly share code, notes, and snippets.

View mitchellvanw's full-sized avatar

Mitchell van Wijngaarden mitchellvanw

View GitHub Profile
@ShawnMcCool
ShawnMcCool / gist:c1e7b62e94ab58f6e8d0
Last active August 29, 2015 14:14
Why a closure is called a closure.
// An anonymous function written in lambda syntax:
x => x + 1
val func = x => x + 1
func(3) // returns 4
// In this case, the lambda `x => x + 1` relies on NO external data.
// It's fundamentally complete. X is provided as an argument to the function.