zhanzhenzhen / futurescript

A future-style language.
https://futurescript.org/
Other
43 stars 3 forks source link

Allows function names with postfix ? or ! #26

Open kristianmandrup opened 7 years ago

kristianmandrup commented 7 years ago

Use ? to indicate function returning boolean

admin?: x -> x.role = 'admin'
admin? user

Use ! to indicate function with side effect

write-user!: user -> 
  write-file user

write-user! current-user