Skip to content

Instantly share code, notes, and snippets.

@zoffixznet

zoffixznet/p6.p6 Secret

Created April 13, 2017 00:23
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 zoffixznet/8f52e9f2a2ecdeadd35780decd6ce77b to your computer and use it in GitHub Desktop.
Save zoffixznet/8f52e9f2a2ecdeadd35780decd6ce77b to your computer and use it in GitHub Desktop.
multi method lines(IO::Path:D:
:$chomp = True, :$enc = 'utf8', :$nl-in = ["\x0A", "\r\n"], |c
) {
self.open(:$chomp, :$enc, :$nl-in).lines: |c, :close
}
multi method comb(IO::Path:D:
:$chomp = True, :$enc = 'utf8', :$nl-in = ["\x0A", "\r\n"], |c
) {
self.open(:$chomp, :$enc, :$nl-in).comb: |c, :close
}
multi method split(IO::Path:D:
:$chomp = True, :$enc = 'utf8', :$nl-in = ["\x0A", "\r\n"], |c
) {
self.open(:$chomp, :$enc, :$nl-in).split: |c, :close
}
multi method words(IO::Path:D:
:$chomp = True, :$enc = 'utf8', :$nl-in = ["\x0A", "\r\n"], |c
) {
self.open(:$chomp, :$enc, :$nl-in).words: |c, :close
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment