On Mon, Jan 23, 2023, 1:16 PM Ollie Read <php@ollie.codes> wrote: > Oh, I didn't mean to suggest that it automatically binds. > > My second suggestion for how to achieve this does require some sort of > automation. If you create a closure from Str::someMethod($arg1, $arg2) > where someMethod isn't static, it should create a closure with the > signature fn(Str $object, $arg1, $arg2), which would wrap a call to > [$object, 'someMethod]($arg1, $arg2).
I think this starts to wonders in the realm of Partial Function Application https://wiki.php.net/rfc/partial_function_application