Created
May 14, 2020 20:51
-
-
Save lizmat/943e0da61d84cff6a61ab8d159729594 to your computer and use it in GitHub Desktop.
What's wrong with these candidates?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proto sub slurp(|) {*} | |
multi sub slurp(*%_) { $*ARGFILES.slurp(|%_) } | |
multi sub slurp(IO::Handle:D $fh, *%_) { $fh.slurp(|%_) } | |
multi sub slurp(IO() $path, *%_) { $path.slurp(|%_) } | |
proto sub spurt($, $, |) {*} | |
multi sub spurt(IO::Handle:D $fh, $data, *%_) { $fh.spurt($data, |%_) } | |
multi sub spurt(IO() $path, $data, *%_) { $path.spurt($data, |%_) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment