classMyClass { method foo(arg) { say arg }}var arg =42# Call a class methodMyClass.foo(arg)# Alternatively, using an expression for the method nameMyClass.(:foo)(arg)# Create an instancevar instance =MyClass()# Instance methodinstance.foo(arg)# Alternatively, by using an expression for the method nameinstance.(:foo)(arg)# Alternatively, by asking for a methodinstance.method(:foo)(arg)