This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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. |