Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created July 15, 2019 17:49
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 Whateverable/1c96879c97ca004d2ce6e1771fb2f179 to your computer and use it in GitHub Desktop.
Save Whateverable/1c96879c97ca004d2ce6e1771fb2f179 to your computer and use it in GitHub Desktop.
greppable6
File Code
ALOREN/Getopt-Advance
…/Advance.pm6 :242:
self.get($name, $type) andthen return .Supply;
ALOREN/Getopt-Advance
…/Advance.pm6 :279:
self!make-cache($name, $type) andthen .reset-value;
ALOREN/Getopt-Advance
…/Advance.pm6 :295:
self.get(key) andthen return .value;
ALOREN/Getopt-Advance
…/Advance.pm6 :442:
self.get($id) andthen return .Supply;
ALOREN/Getopt-Advance
…/Advance.pm6 :486:
self.get-main($id) andthen return .Supply;
ALOREN/Getopt-Advance
…/Advance.pm6 :505:
self.get-cmd($id) andthen return .Supply;
ALOREN/Getopt-Advance
…/Advance.pm6 :526:
self.get-pos($id) andthen return .Supply;
HANENKAMP/ArrayHash
…/ArrayHash.pm6 :608:
andthen %!hash{ $head.key } :delete;
HANENKAMP/HTTP-Request-FormData
…/FormData.pm6 :192:
$!boundary andthen X::HTTP::Request::FormData.new.throw;
HANENKAMP/ModelDB
…/RelationshipSetup.pm6 :25:
# andthen $value."_set-key-for-$relationship-name"($schema-ref);
HANENKAMP/Smack
…/Smack.pm6 :195:
$header-done andthen $header-done.keep(True);
HANENKAMP/Smack
…/Smack.pm6 :233:
$body-done andthen $body-done.keep(True);
HANENKAMP/Smack
…/Smack.pm6 :246:
$body-done andthen $body-done.break($x);
HANENKAMP/Smack
…/Smack.pm6 :250:
$ready andthen $ready.keep(True);
JGOFF/Perl6-Parser
…/19-operators.t :2623:
# XXX '3andthen2' illegal
JGOFF/Perl6-Parser
…/19-operators.t :2628:
3 andthen 2
JGOFF/Perl6-Parser
…/19-operators.t :2635:
}, Q{andthen};
MATIASL/Pygments
…/perl.py :305:
'X', 'Z', 'after', 'also', 'and', 'andthen', 'before', 'cmp', 'div',
UGEXE/zef
…/repository.t :58:
$p6c.cache //= $*HOME.child('.zef/store').absolute andthen { mkdir $_ unless $_.IO.e };
UGEXE/zef
…/repository.t :81:
$cpan.cache //= $*HOME.child('.zef/store').absolute andthen { mkdir $_ unless $_.IO.e };
PerlGameDev/SDL6
…/core.t :6:
SDL_Linked_Version() andthen diag sprintf 'SDL_Linked_Version v%d.%d.%d', .major, .minor, .patch;
PerlGameDev/SDL6
…/mixer-channels.t :7:
Mix_Linked_Version() andthen diag sprintf 'Mix_Linked_Version v%d.%d.%d', .major, .minor, .patch;
PerlGameDev/SDL6
…/rect.t :6:
SDL_Linked_Version() andthen diag sprintf 'v%d.%d.%d', .major, .minor, .patch;
araraloren/perl6-getopt-advance
…/Advance.pm6 :242:
self.get($name, $type) andthen return .Supply;
araraloren/perl6-getopt-advance
…/Advance.pm6 :279:
self!make-cache($name, $type) andthen .reset-value;
araraloren/perl6-getopt-advance
…/Advance.pm6 :295:
self.get(key) andthen return .value;
araraloren/perl6-getopt-advance
…/Advance.pm6 :442:
self.get($id) andthen return .Supply;
araraloren/perl6-getopt-advance
…/Advance.pm6 :486:
self.get-main($id) andthen return .Supply;
araraloren/perl6-getopt-advance
…/Advance.pm6 :505:
self.get-cmd($id) andthen return .Supply;
araraloren/perl6-getopt-advance
…/Advance.pm6 :526:
self.get-pos($id) andthen return .Supply;
azawawi/farabi6
…/perl6-mode.js :312:
"gt ge eqv ff fff and andthen Z X or xor",
cygx/p6-tinycc
…/Eval.pm :40:
LEAVE $bin andthen .close;
drforr/perl6-Perl6-Parser
…/19-operators.t :2623:
# XXX '3andthen2' illegal
drforr/perl6-Perl6-Parser
…/19-operators.t :2628:
3 andthen 2
drforr/perl6-Perl6-Parser
…/19-operators.t :2635:
}, Q{andthen};
jnthn/p6-http-hpack
…/HPACK.pm6 :266:
with @found.first({ .value.value andthen $_ eq $header.value }) {
nkh/P6-Data-Dump-Tree
…/Tree.pm :172:
@.title andthen $clone.render_root: Data::Dump::Tree::Type::Nothing.new ;
nkh/P6-Data-Dump-Tree
…/Foldable.pm :226:
$page_size andthen $!page_size = max $page_size, 0 ;
nkh/P6-Data-Dump-Tree
…/Foldable.pm :228:
$top_line andthen $!top_line = max(min($top_line, @!folds - $!page_size), 0) ;
nkh/P6-Data-Dump-Tree
…/Foldable.pm :230:
$selected_line andthen $!selected_line = $selected_line ;
nkh/P6-Data-Dump-Tree
…/LayHorizontal.pm :244:
ddt $data, :flat( { $_ ~~ Array andthen True, 5} )
nkh/P6-Data-Dump-Tree
…/LayHorizontal.pm :248:
ddt $data, :flat( { $_ ~~ Array andthen True, 5, 10} )
nkh/P6-Data-Dump-Tree
…/LayHorizontal.pm :281:
$ss andthen $rows = $ss ;
nkh/P6-Data-Dump-Tree
…/LayHorizontal.pm :282:
$sr andthen $width = $sr ;
perl6-community-modules/perl6-Toaster
…/Toaster.pm6 :39:
.out.lines(:close).grep(*.contains: 'CPU(s)').head andthen .words.tail.Int
perl6/DBIish
…/SQLite.pm6 :36:
with (%*ENV<DBIISH_SQLITE_LIB> andthen NativeLibs::Searcher.try-versions($_, $wks))
perl6/DBIish
…/Connection.pm6 :42:
with $!last-sth-id andthen $!statements-lock.protect({ %!statements{$_} }) {
perl6/doc
…/faq.pod6 :354:
statements, L«C<//>|/routine/$SOLIDUS$SOLIDUS», L<andthen|/routine/andthen>, L<notandthen|/routine/notandthen>, and
perl6/doc
…/haskell-to-p6.pod6 :121:
For more natural control flow with undefined and defined types, Perl 6 introduces C<andthen> and C<orelse>.
perl6/doc
…/haskell-to-p6.pod6 :130:
hello() andthen say 'bye';
perl6/doc
…/haskell-to-p6.pod6 :134:
TODO: include a better example for andthen that makes sense. Maybe using promise objects?
perl6/doc
…/operators.pod6 :44:
X | Loose and | and andthen notandthen
perl6/doc
…/operators.pod6 :2599:
=head2 infix X<C«andthen»>
perl6/doc
…/operators.pod6 :2601:
The C<andthen> operator returns
perl6/doc
…/operators.pod6 :2612:
caller. Since the C<andthen> operator short-circuits, statements on the
perl6/doc
…/operators.pod6 :2621:
load-data.first: /good/ andthen say "$_ is good";
perl6/doc
…/operators.pod6 :2624:
load-data() andthen .return; # return loaded data, if it's defined
perl6/doc
…/operators.pod6 :2632:
The C<andthen> operator is a close relative of
perl6/doc
…/operators.pod6 :2634:
compile C<with> to C<andthen>, meaning these two lines have equivalent
perl6/doc
…/operators.pod6 :2638:
42 andthen .say;
perl6/doc
…/operators.pod6 :2640:
=head2 infix X<C«notandthen»>
perl6/doc
…/operators.pod6 :2642:
The C<notandthen> operator returns
perl6/doc
…/operators.pod6 :2650:
At first glance, L<notandthen|/routine/notandthen> might appear to be the same
perl6/doc
…/operators.pod6 :2652:
L<notandthen|/routine/notandthen> returns
perl6/doc
…/operators.pod6 :2656:
L<notandthen|/routine/notandthen> is a means to act when items aren't defined,
perl6/doc
…/operators.pod6 :2660:
sub all-sensors-down { [notandthen] |@_, True }
perl6/doc
…/operators.pod6 :2672:
The C<notandthen> operator is a close relative of
perl6/doc
…/operators.pod6 :2674:
compile C<without> to C<notandthen>, meaning these two lines have equivalent
perl6/doc
…/operators.pod6 :2681:
good-things() notandthen 'boo'.say;
perl6/doc
…/operators.pod6 :2716:
meows() andthen .say orelse ‘something's wrong’.say;
perl6/doc
…/traps.pod6 :823:
The smartmatch operator C<~~> and C<andthen> set the topic C<$_> to
perl6/doc
…/traps.pod6 :1698:
L<is defined|/routine/andthen> before doing anything with it.
perl6/doc
…/traps.pod6 :1703:
LEAVE $x andthen .Int.say;
perl6/doc
…/ClassHOW.pod6 :95:
Str.^lookup: $^meth andthen .("foo").say
perl6/doc
…/MROBasedMethodDispatch.pod6 :24:
Str.^find_method: $^meth andthen .("foo").say
perl6/doc
…/Signature.pod6 :876:
$x andthen $y andthen $z andthen True
perl6/doc
…/htmlify.p6 :1057:
$proc.start andthen say "Starting highlights worker thread" unless $proc.started;
perl6/doc
…/code.pws :312:
notandthen
perl6/doc
…/words.pws :31:
andthen
sergot/http-useragent
…/UserAgent.pm6 :336:
$response.content = $content andthen $response.content = $response.decoded-content(:$bin);
shuppet/p6-api-discord
…/Message.pm6 :195:
$.author andthen %json<author> = .to-json;
shuppet/p6-api-discord
…/Message.pm6 :198:
%self{$prop} andthen %json{$prop} = [map *.to-json, $_.values]
spitsh/spitsh
…/Parse.pm6 :266:
"Invalid value for {$opt<name>}." ~ ($wanted andthen " Expected a $_ but got: ‘{$<str>.Str}’."),
spitsh/spitsh
…/Parse.pm6 :535:
('>> ' ~ $.command andthen "$_ ") ~
spitsh/spitsh
…/Parse.pm6 :538:
"$.message\n$command-line" ~ ($.usage andthen "\n\n$_");
spitsh/spitsh
…/Exceptions.pm6 :145:
"Couldn't find closing ‘$.closer’{ $!desc andthen " to finish $_" }"
spitsh/spitsh
…/Exceptions.pm6 :155:
"Type check failed{ $!desc andthen " for $_" }.\nExpected $!expected but got $!got.";
spitsh/spitsh
…/Exceptions.pm6 :200:
" $!name { $!class andthen "on class {$!class.name} " }does't have a candidate that matches {$!os.name} OS." ~
spitsh/spitsh
…/Actions.pm6 :108:
my %use = ($<identifier> andthen id => .Str)
spitsh/spitsh
…/Actions.pm6 :251:
$<default> andthen $last.else = .ast;
spitsh/spitsh
…/Actions.pm6 :557:
$package = ($*CLASS andthen .class);
spitsh/spitsh
…/Actions.pm6 :632:
$block.one-stmt andthen (
spitsh/spitsh
…/Actions.pm6 :673:
andthen (my $list = .ast) ~~ SAST::List
spitsh/spitsh
…/Actions.pm6 :777:
$<eq-infix> andthen $var.assign-mod = .ast;
spitsh/spitsh
…/Actions.pm6 :982:
make ($<params> andthen .<wrapped><type>.map(*.&_ast));
spitsh/spitsh
…/Actions.pm6 :1033:
($src<all> andthen (make-fd(1),make-fd(2)))
spitsh/spitsh
…/Actions.pm6 :1034:
or $src<fd> andthen .ast
spitsh/spitsh
…/Actions.pm6 :1065:
$log<symbol-path> andthen SAST::SVal.new(val => "$_ ")
spitsh/spitsh
…/Actions.pm6 :1067:
$log<literal-path> andthen SAST::SVal.new(val => .Str)
spitsh/spitsh
…/Actions.pm6 :1069:
$log<path> andthen ($++ ?? .ast !! .ast.deep-clone);
spitsh/spitsh
…/Actions.pm6 :1097:
sub make-quote($/) { make $<str>.ast andthen .match = $/ }
spitsh/spitsh
…/Actions.pm6 :1131:
for |($<args> andthen .ast<pos>) {
spitsh/spitsh
…/Grammar.pm6 :769:
$closer = @brackets[$i + 1] x (($opener<repeat> andthen .elems) + 1);
spitsh/spitsh
…/Quote.pm6 :111:
make ($<escaped><special> andthen .Str) || $/.Str;
spitsh/spitsh
…/Regex.pm6 :221:
$<backslash>.ast andthen make($_);
spitsh/spitsh
…/Repo.pm6 :48:
get-CORE-lib($id) andthen .return;
spitsh/spitsh
…/Repo.pm6 :52:
multi method resolve(:$id!) { get-CORE-lib($id) andthen .return }
spitsh/spitsh
…/SAST.pm6 :416:
$!logged-as andthen $_ .= do-stage2(tStr);
spitsh/spitsh
…/SAST.pm6 :453:
self.assign if self.assign andthen .compile-time !~~ Nil;
spitsh/spitsh
…/SAST.pm6 :476:
$!type = (self.returns andthen .type or tAny);
spitsh/spitsh
…/SAST.pm6 :504:
method itemize { self.last-stmt andthen .itemize or False }
spitsh/spitsh
…/SAST.pm6 :656:
if (my $invocant = ($!pipe-in andthen .is-self)) and $*no-pipe {
spitsh/spitsh
…/SAST.pm6 :661:
$var.declaration.logged-as andthen $!logged-as = .deep-clone;
spitsh/spitsh
…/SAST.pm6 :787:
$!invocant andthen $_ .= do-stage2(tAny);
spitsh/spitsh
…/SAST.pm6 :963:
method piped { $!pipe-vote andthen $_ > 0 }
spitsh/spitsh
…/SAST.pm6 :1008:
~($.ord + (($.signature.invocant andthen !.piped) ?? 1 !! 0 ) + 1);
spitsh/spitsh
…/SAST.pm6 :1040:
$!invocant andthen .signature = self;
spitsh/spitsh
…/SAST.pm6 :1482:
$!init andthen $_ .= do-stage2(tAny);
spitsh/spitsh
…/SAST.pm6 :1486:
$!incr andthen $_ .= do-stage2(tAny);
spitsh/spitsh
…/SAST.pm6 :1689:
@.symbols[$type]{$name} andthen .return;
spitsh/spitsh
…/SAST.pm6 :1863:
($!chosen-block andthen .type) or
spitsh/spitsh
…/SAST.pm6 :1883:
$!path andthen $_ .= do-stage2(tStr);
spitsh/spitsh
…/Call-Inliner.pm6 :57:
.compile-time andthen $char-count += ($_ ~~ Bool ?? (.so ?? 1 !! 0) !! .Str.chars);
spitsh/spitsh
…/Compiler.pm6 :368:
(.invocant andthen (.piped ?? Empty !! $_) when SAST::MethodDeclare),
spitsh/spitsh
…/Compiler.pm6 :536:
|(.default andthen "\n$*pad *) ", |self.node($_, :one-line), ';;'),
spitsh/spitsh
…/Compile-Cmd-And-Call.pm6 :15:
if $input andthen
spitsh/spitsh
…/Compile-Cmd-And-Call.pm6 :18:
!($input.is-self andthen .piped)
spitsh/spitsh
…/Compile-Cmd-And-Call.pm6 :52:
slurpy-start => (.declaration.signature.slurpy-param andthen .ord)
spitsh/spitsh
…/Compile-Cmd-And-Call.pm6 :54:
|(.null andthen ' >&',|self.arg($_))
spitsh/spitsh
…/Compile-Cmd-And-Call.pm6 :67:
my $slurpy-start = (.declaration.signature.slurpy-param andthen .ord);
spitsh/spitsh
…/Compile-Cmd-And-Call.pm6 :69:
if .declaration.invocant andthen .piped {
spitsh/spitsh
…/Compile-Cmd-And-Call.pm6 :92:
|$call, |(.null andthen ' >&',|self.arg($_)),
spitsh/spitsh
…/Compile-Statement-Control.pm6 :64:
and not (.topic-var andthen .depended) {
spitsh/spitsh
…/Compile-Statement-Control.pm6 :96:
|(.init andthen |self.node($_),'; '),
spitsh/spitsh
…/Compile-Statement-Control.pm6 :99:
|(.incr andthen "\n", |self.compile-nodes([$_], :indent)),
spitsh/spitsh
…/Composer.pm6 :181:
if ($THIS.pipe-in andthen .is-self) -> $invocant {
spitsh/spitsh
…/Composer.pm6 :292:
$THIS.else andthen self.walk($_,:sub-if);
spitsh/spitsh
…/Composer.pm6 :591:
(.nodes[*-1] andthen .identity === $orig-invocant);
spitsh/spitsh
…/Composer.pm6 :594:
(.pos[*-1] || .invocant) andthen .identity === $orig-invocant;
spitsh/spitsh
…/Composer.pm6 :597:
.pos[*-1] andthen .identity === $orig-invocant;
spitsh/spitsh
…/Composer.pm6 :609:
with ($THIS.Bool-call andthen .compile-time) {
spitsh/spitsh
…/Composer.pm6 :703:
if ($THIS.declaration.invocant andthen .piped) {
spitsh/spitsh
…/Composer.pm6 :705:
if ($THIS.invocant andthen .is-self) -> $self
spitsh/spitsh
…/ShellElement.pm6 :52:
|\\ [ <?[\\$"`]> || $ <?{$next andthen .match(/^<?[\\$"`]>/)}> ]
spitsh/spitsh
…/ShellElement.pm6 :75:
|\\ [ <?[\\$"`}]> || $ <?{$next andthen .match(/^<?[\\$"`}]>/)}> ]
spitsh/spitsh
…/ShellElement.pm6 :123:
method in-DQ(:$next) { ($next andthen m/^\w/) ?? ('${',$!name,'}') !! ('$',$!name) }
spitsh/spitsh
…/Stage2-Util.pm6 :45:
match => ($last-valid andthen .match or $call.match),
spitsh/spitsh
…/cli.pm6 :342:
my @runs = |($in-docker andthen .split(',').map: { "-d=$_" }),
spitsh/spitsh
…/cli.pm6 :343:
|($in-container andthen .split(',').map({"-D=$_"})),
spitsh/spitsh
…/cli.pm6 :344:
|($in-helper andthen '-h'),
spitsh/spitsh
…/cli.pm6 :345:
|($RUN andthen '--RUN');
ugexe/Perl6-Net--HTTP
…/README.pod :124:
> my $data = buf8.new andthen while $socket.recv(:bin) -> d { $data ~= $d }
ugexe/Perl6-Net--HTTP
…/Request.pm6 :32:
my $buf = buf8.new andthen {
ugexe/Perl6-Net--HTTP
…/Response.pm6 :32:
my %header andthen do { %header{.[0]}.append(.[1].trim-leading) for @header-lines>>.split(':', 2) }
ugexe/Perl6-Net--HTTP
…/Response.pm6 :38:
method status-code { $!status-line ~~ self!status-line-matcher andthen return ~$_[0] }
ugexe/Perl6-Net--HTTP
…/Transport.pm6 :31:
my %header andthen do { %header{hc(.[0])}.append(.[1].trim-leading) for @header-lines>>.split(':', 2) }
ugexe/Perl6-Net--HTTP
…/URL.pm6 :27:
method scheme { self.parse<scheme> andthen return ~$_ }
ugexe/Perl6-Net--HTTP
…/URL.pm6 :28:
method host { self.parse<host> andthen return ~$_ }
ugexe/Perl6-Net--HTTP
…/URL.pm6 :29:
method port { self.parse<port> andthen return ~$_ }
ugexe/Perl6-Net--HTTP
…/URL.pm6 :30:
method path { self.parse<path> andthen return ~$_ }
ugexe/Perl6-Net--HTTP
…/URL.pm6 :31:
method query { self.parse<query> andthen return ~$_ }
ugexe/Perl6-Net--HTTP
…/URL.pm6 :32:
method fragment { self.parse<fragment> andthen return ~$_ }
ugexe/zef
…/MetaCPAN.pm6 :78:
andthen {.parent.mkdir unless .parent.e};
ugexe/zef
…/repository.t :56:
my $cache = $*HOME.child('.zef/store').absolute andthen { mkdir $_ unless $_.IO.e };
ugexe/zef
…/repository.t :78:
my $cache = $*HOME.child('.zef/store').absolute andthen { mkdir $_ unless $_.IO.e };
zoffixznet/perl6-Testo
…/TAP.pm6 :27:
$test.fail andthen $!err.say: .lines.map({
zoffixznet/perl6-WWW-P6lert
…/README.md :176:
andthen "Alert ID#42 says {.alert}".say
zoffixznet/perl6-WWW-vlc-Remote
…/Remote.pm6 :56:
if $dom.at('title').all-text andthen .starts-with: 'Error loading';
zoffixznet/perl6-WWW-vlc-Remote
…/Remote.pm6 :81:
if $dom.at('title').all-text andthen .starts-with: 'Error loading';
zoffixznet/perl6-WWW-vlc-Remote
…/Remote.pm6 :110:
if $dom.at('title').all-text andthen .starts-with: 'Error loading';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment