RosettaCodeData/Task/Call-a-function/Dyalect/call-a-function-10.dyalect

4 lines
229 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
//There is no difference between subroutines and functions:
func foo() { } //doesn't explicitly return something (but in fact returns nil)
func bar(x) { return x * 2 } //explicitly returns value (keyword "return" can be omitted)