resolve # in $function Ruby-style