RosettaCodeData/Task/Call-an-object-method/Dyalect/call-an-object-method.dyalect

13 lines
187 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
//Static method on a built-in type Integer
static func Integer.Div(x, y) {
x / y
}
//Instance method
func Integer.Div(n) {
this / n
}
print(Integer.Div(12, 3))
print(12.Div(3))