Created
December 4, 2015 18:49
-
-
Save cognominal/c7c21d63649e6c5bfcc5 to your computer and use it in GitHub Desktop.
superseding .print
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
use MONKEY-TYPING; | |
supersede class IO::Handler { | |
my %escape = < \< < \> > >; | |
multi method print(IO::Handle:D: Str:D \x --> True) { | |
my &line = { "<div><$_></div></br>" } | |
[~] x.lines.map: { line [~] .comb.map: %escape{$_} // * } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment