charly-lang / charly

🐈 The Charly Programming Language | Written by @KCreate
https://charly-lang.github.io/charly/
MIT License
199 stars 10 forks source link

Lambda function syntax #89

Closed KCreate closed 7 years ago

KCreate commented 7 years ago

Proposal:

func foo(callback, arg) {
  callback(arg);
}

foo(->(arg) {
  arg + 2
}, 25) # 27

foo(->(arg) arg + 2, 25) # 27

foo(->{ 78 }, 25) # 78

foo(->100, 25) # 25
KCreate commented 7 years ago

Closed via #90