Kipper-Lang / Kipper

The Kipper programming language for Browsers and Node.js 🦊✨ Made at HTL Leonding
https://kipper-lang.org
GNU General Public License v3.0
25 stars 4 forks source link

[Feature] Add lambda function expressions #572

Open lorenzholzbauer opened 5 days ago

lorenzholzbauer commented 5 days ago

Is there an existing proposal for this?

This feature does not exist in the latest version

Proposal

Add lambda function support, which allows users to specify anonymous functions without a name that always return a value.

For example:

(x: num) => x + 1;

// Once generics are implemented with #
var y: Func<num, num> = (x: num) => x + 1;

Exact behaviour / changes you want

Luna-Klatzer commented 4 days ago

Generic type support will be implemented by #494 and #584.