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

4 lines
229 B
Plaintext

//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)