Skip to content

Instantly share code, notes, and snippets.

@gfldex
Created March 1, 2022 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gfldex/0df500d560d3e59a2360162a3a3bad6a to your computer and use it in GitHub Desktop.
Save gfldex/0df500d560d3e59a2360162a3a3bad6a to your computer and use it in GitHub Desktop.
class C {
multi method m(Int $i) { $i + 1 }
}
C.^methods.classify(*.name)<m>[0].add_dispatchee(my method m(Int() $i) { self.m($i) });
C.new.m("41").say;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment