You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def 'def'() {
print("Why would you ever do this")
}
def '*'(a: Vec2, b: Float): Vec2 {
return { x: a.x*b, y: a.y*b }
}
Define operators as quote-identifier'd symbols
Define built-in operators as quoted functions we can pass forward
// This would be a builtin
def '*'(a: Float, b: Float): Float {
return a * b;
}
// Alright this could get very messy from overload resolution standpoint
let product = numbers.reduce('*', 1.0)