Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created November 4, 2019 02:17
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/0d58f0013202a19a5dcf84cbdd7a3369 to your computer and use it in GitHub Desktop.
Save Whateverable/0d58f0013202a19a5dcf84cbdd7a3369 to your computer and use it in GitHub Desktop.
greppable6
File Code
ELIZABETH/List-AllUtils
…/README.md :48:
lastres lastval listcmp lower_bound mesh minmax minmaxstr mode natatime
ELIZABETH/List-AllUtils
…/README.md :55:
bundle_by count_by extract_by extract_first_by max_by min_by minmax_by
ELIZABETH/List-AllUtils
…/README.md :56:
nmax_by nmin_by nminmax_by partition_by rev_nsort_by rev_sort_by uniq_by
ELIZABETH/List-AllUtils
…/AllUtils.pm6 :86:
lastres lastval listcmp lower_bound mesh minmax minmaxstr mode natatime
ELIZABETH/List-AllUtils
…/AllUtils.pm6 :93:
bundle_by count_by extract_by extract_first_by max_by min_by minmax_by
ELIZABETH/List-AllUtils
…/AllUtils.pm6 :94:
nmax_by nmin_by nminmax_by partition_by rev_nsort_by rev_sort_by uniq_by
ELIZABETH/List-AllUtils
…/01-basic.t :12:
lastval listcmp lower_bound max max_by maxstr mesh min min_by minmax
ELIZABETH/List-AllUtils
…/01-basic.t :13:
minmax_by minmaxstr minstr mode natatime nmax_by nmin_by nminmax_by none
ELIZABETH/List-AllUtils
…/02-basic.t :12:
lastval listcmp lower_bound max max_by maxstr mesh min min_by minmax
ELIZABETH/List-AllUtils
…/02-basic.t :13:
minmax_by minmaxstr minstr mode natatime nmax_by nmin_by nminmax_by none
ELIZABETH/List-MoreUtils
…/README.md :54:
any all none minmax uniq zip
ELIZABETH/List-MoreUtils
…/README.md :60:
use List::Util <minmax>;
ELIZABETH/List-MoreUtils
…/README.md :61:
say minmax @a; # Ported Perl 5 version
ELIZABETH/List-MoreUtils
…/README.md :62:
say @a.minmax; # Perl 6 version
ELIZABETH/List-MoreUtils
…/README.md :64:
say minmax @a; # Perl 6 version again
ELIZABETH/List-MoreUtils
…/README.md :908:
### minmax LIST
ELIZABETH/List-MoreUtils
…/README.md :912:
my ($min,$max) = minmax (43,66,77,23,780); # (23,780)
ELIZABETH/List-MoreUtils
…/README.md :916:
my $range = <43,66,77,23,780>.minmax( +* );
ELIZABETH/List-MoreUtils
…/README.md :917:
my $range = (43,66,77,23,780).minmax; # auto-numerically compares
ELIZABETH/List-MoreUtils
…/README.md :919:
### minmaxstr LIST
ELIZABETH/List-MoreUtils
…/README.md :923:
my ($min,$max) = minmaxstr <foo bar baz zippo>; # <bar zippo>
ELIZABETH/List-MoreUtils
…/README.md :927:
my $range = (43,66,77,23,780).minmax( ~* );
ELIZABETH/List-MoreUtils
…/README.md :928:
my $range = <foo bar baz zippo>.minmax; # auto-string compares
ELIZABETH/List-MoreUtils
…/MoreUtils.pm6 :371:
our sub minmax(@values) is export(:all) {
ELIZABETH/List-MoreUtils
…/MoreUtils.pm6 :373:
?? ((.min,.max) with @values.minmax)
ELIZABETH/List-MoreUtils
…/MoreUtils.pm6 :376:
our constant &minmaxstr is export(:all) = &minmax;
ELIZABETH/List-MoreUtils
…/MoreUtils.pm6 :559:
any all none minmax uniq zip
ELIZABETH/List-MoreUtils
…/MoreUtils.pm6 :570:
use List::Util <minmax>;
ELIZABETH/List-MoreUtils
…/MoreUtils.pm6 :571:
say minmax @a; # Ported Perl 5 version
ELIZABETH/List-MoreUtils
…/MoreUtils.pm6 :572:
say @a.minmax; # Perl 6 version
ELIZABETH/List-MoreUtils
…/MoreUtils.pm6 :574:
say minmax @a; # Perl 6 version again
ELIZABETH/List-MoreUtils
…/MoreUtils.pm6 :1538:
=head3 minmax LIST
ELIZABETH/List-MoreUtils
…/MoreUtils.pm6 :1544:
my ($min,$max) = minmax (43,66,77,23,780); # (23,780)
ELIZABETH/List-MoreUtils
…/MoreUtils.pm6 :1548:
my $range = <43,66,77,23,780>.minmax( +* );
ELIZABETH/List-MoreUtils
…/MoreUtils.pm6 :1549:
my $range = (43,66,77,23,780).minmax; # auto-numerically compares
ELIZABETH/List-MoreUtils
…/MoreUtils.pm6 :1551:
=head3 minmaxstr LIST
ELIZABETH/List-MoreUtils
…/MoreUtils.pm6 :1557:
my ($min,$max) = minmaxstr <foo bar baz zippo>; # <bar zippo>
ELIZABETH/List-MoreUtils
…/MoreUtils.pm6 :1561:
my $range = (43,66,77,23,780).minmax( ~* );
ELIZABETH/List-MoreUtils
…/MoreUtils.pm6 :1562:
my $range = <foo bar baz zippo>.minmax; # auto-string compares
ELIZABETH/List-MoreUtils
…/01-basic.t :11:
lastres last_result lastval last_value listcmp lower_bound mesh minmax
ELIZABETH/List-MoreUtils
…/01-basic.t :12:
minmaxstr mode natatime nsort_by none none_u notall notall_u occurrences
ELIZABETH/List-MoreUtils
…/02-basic.t :11:
lastres last_result lastval last_value listcmp lower_bound mesh minmax
ELIZABETH/List-MoreUtils
…/02-basic.t :12:
minmaxstr mode natatime nsort_by none none_u notall notall_u occurrences
ELIZABETH/List-MoreUtils
…/minmax.t :3:
use List::MoreUtils <minmax>;
ELIZABETH/List-MoreUtils
…/minmax.t :9:
is-deeply minmax(@list), (0,10000), "get minmax of reversed range";
ELIZABETH/List-MoreUtils
…/minmax.t :12:
is-deeply minmax(@list), (0,10001), "even number of elements";
ELIZABETH/List-MoreUtils
…/minmax.t :15:
is-deeply minmax(@list), (-10/3,10000), "some rats";
ELIZABETH/List-MoreUtils
…/minmax.t :17:
is-deeply minmax((-1,)), (-1,-1), "single element list";
ELIZABETH/List-MoreUtils
…/minmaxstr.t :3:
use List::MoreUtils <minmaxstr>;
ELIZABETH/List-MoreUtils
…/minmaxstr.t :9:
is-deeply minmaxstr(@list), ("AA","ZZ"), "get minmaxstr of reversed range";
ELIZABETH/List-MoreUtils
…/minmaxstr.t :12:
is-deeply minmaxstr(@list), ("AA","ZZ Top"), "even number of elements";
ELIZABETH/List-MoreUtils
…/minmaxstr.t :14:
is-deeply minmaxstr(("foo",)), ("foo","foo"), "single element list";
ELIZABETH/List-SomeUtils
…/01-basic.t :11:
lastres last_result lastval last_value listcmp lower_bound mesh minmax
ELIZABETH/List-SomeUtils
…/01-basic.t :12:
minmaxstr mode natatime nsort_by none none_u notall notall_u occurrences
ELIZABETH/List-SomeUtils
…/02-basic.t :11:
lastres last_result lastval last_value listcmp lower_bound mesh minmax
ELIZABETH/List-SomeUtils
…/02-basic.t :12:
minmaxstr mode natatime nsort_by none none_u notall notall_u occurrences
ELIZABETH/List-UtilsBy
…/README.md :127:
minmax_by
ELIZABETH/List-UtilsBy
…/README.md :130:
my ($minimal, $maximal) = minmax_by { KEYFUNC }, @values;
ELIZABETH/List-UtilsBy
…/README.md :132:
Similar to calling both /min_by and /max_by with the same key function on the same list. This version is more efficient than calling the two other functions individually, as it has less work to perform overall. Also provided as `nminmax_by`.
ELIZABETH/List-UtilsBy
…/README.md :136:
my ($smallest,$tallest) = @people.minmax: *.height;
ELIZABETH/List-UtilsBy
…/UtilsBy.pm6 :40:
our sub minmax_by(&code, *@values) is export(:all) {
ELIZABETH/List-UtilsBy
…/UtilsBy.pm6 :64:
our constant &nminmax_by is export(:all) = &minmax_by;
ELIZABETH/List-UtilsBy
…/UtilsBy.pm6 :336:
=head2 minmax_by
ELIZABETH/List-UtilsBy
…/UtilsBy.pm6 :338:
my ($minimal, $maximal) = minmax_by { KEYFUNC }, @values;
ELIZABETH/List-UtilsBy
…/UtilsBy.pm6 :343:
as C<nminmax_by>.
ELIZABETH/List-UtilsBy
…/UtilsBy.pm6 :347:
my ($smallest,$tallest) = @people.minmax: *.height;
ELIZABETH/List-UtilsBy
…/01-basic.t :6:
bundle_by count_by extract_by extract_first_by max_by min_by minmax_by
ELIZABETH/List-UtilsBy
…/01-basic.t :7:
nmax_by nmin_by nminmax_by nsort_by partition_by rev_nsort_by rev_sort_by
ELIZABETH/List-UtilsBy
…/minmax_by.t :3:
use List::UtilsBy <minmax_by nminmax_by>;
ELIZABETH/List-UtilsBy
…/minmax_by.t :7:
is-deeply minmax_by( { $_ } ), (), 'empty list yields empty';
ELIZABETH/List-UtilsBy
…/minmax_by.t :9:
is-deeply minmax_by( { $_ }, 10), (10,10), 'unit list yields value twice';
ELIZABETH/List-UtilsBy
…/minmax_by.t :11:
is-deeply minmax_by( { $_ }, 10,20,30,40,50), (10,50),
ELIZABETH/List-UtilsBy
…/minmax_by.t :13:
is-deeply minmax_by( { $_[0] }, 10,20,30,40,50), (10,50),
ELIZABETH/List-UtilsBy
…/minmax_by.t :16:
is-deeply minmax_by( { $_ }, 50,40,30,20,10), (10,50),
ELIZABETH/List-UtilsBy
…/minmax_by.t :19:
is-deeply minmax_by( &chars, <a ccc bb>), <a ccc>, 'chars function';
ELIZABETH/List-UtilsBy
…/minmax_by.t :21:
is-deeply nminmax_by( { $_ }, 10, 20), (10,20), 'nminmax_by alias';
MATIASL/Pygments
…/perl.py :267:
'max', 'min', 'minmax', 'name', 'new', 'nextsame', 'nextwith', 'nfc',
TITSUKI/Algorithm-MinMaxHeap
…/MinMaxHeap.pm6 :33:
if @!nodes[1] minmaxheap-cmp @!nodes[2] == Order::More {
TITSUKI/Algorithm-MinMaxHeap
…/MinMaxHeap.pm6 :68:
elsif @!nodes[1] minmaxheap-cmp @!nodes[2] == Order::Same|Order::More {
TITSUKI/Algorithm-MinMaxHeap
…/MinMaxHeap.pm6 :74:
elsif @!nodes[1] minmaxheap-cmp @!nodes[2] == Order::Less {
TITSUKI/Algorithm-MinMaxHeap
…/MinMaxHeap.pm6 :104:
if self!has-parent($index) and (@!nodes[$index] minmaxheap-cmp @!nodes[self!find-parent($index)] == Order::More) {
TITSUKI/Algorithm-MinMaxHeap
…/MinMaxHeap.pm6 :111:
if self!has-parent($index) and (@!nodes[$index] minmaxheap-cmp @!nodes[self!find-parent($index)] == Order::Less) {
TITSUKI/Algorithm-MinMaxHeap
…/MinMaxHeap.pm6 :122:
if @!nodes[$index] minmaxheap-cmp @!nodes[self!find-grandparent($index)] == Order::Less {
TITSUKI/Algorithm-MinMaxHeap
…/MinMaxHeap.pm6 :131:
if @!nodes[$index] minmaxheap-cmp @!nodes[self!find-grandparent($index)] == Order::More {
TITSUKI/Algorithm-MinMaxHeap
…/MinMaxHeap.pm6 :151:
if @!nodes[$smallest-index] minmaxheap-cmp @!nodes[$index] == Order::Less {
TITSUKI/Algorithm-MinMaxHeap
…/MinMaxHeap.pm6 :153:
if @!nodes[$smallest-index] minmaxheap-cmp @!nodes[self!find-parent($smallest-index)] == Order::More {
TITSUKI/Algorithm-MinMaxHeap
…/MinMaxHeap.pm6 :159:
if @!nodes[$smallest-index] minmaxheap-cmp @!nodes[$index] == Order::Less {
TITSUKI/Algorithm-MinMaxHeap
…/MinMaxHeap.pm6 :170:
if @!nodes[$largest-index] minmaxheap-cmp @!nodes[$index] == Order::More {
TITSUKI/Algorithm-MinMaxHeap
…/MinMaxHeap.pm6 :172:
if @!nodes[$largest-index] minmaxheap-cmp @!nodes[self!find-parent($largest-index)] == Order::Less {
TITSUKI/Algorithm-MinMaxHeap
…/MinMaxHeap.pm6 :178:
if @!nodes[$largest-index] minmaxheap-cmp @!nodes[$index] == Order::More {
TITSUKI/Algorithm-MinMaxHeap
…/MinMaxHeap.pm6 :196:
if not $smallest-value.defined or $smallest-value minmaxheap-cmp @!nodes[$left-child] == Order::More {
TITSUKI/Algorithm-MinMaxHeap
…/MinMaxHeap.pm6 :203:
if not $smallest-value.defined or $smallest-value minmaxheap-cmp @!nodes[self!find-left-child($left-child)] == Order::More {
TITSUKI/Algorithm-MinMaxHeap
…/MinMaxHeap.pm6 :210:
if not $smallest-value.defined or $smallest-value minmaxheap-cmp @!nodes[self!find-right-child($left-child)] == Order::More {
TITSUKI/Algorithm-MinMaxHeap
…/MinMaxHeap.pm6 :219:
if not $smallest-value.defined or $smallest-value minmaxheap-cmp @!nodes[$right-child] == Order::More {
TITSUKI/Algorithm-MinMaxHeap
…/MinMaxHeap.pm6 :226:
if not $smallest-value.defined or $smallest-value minmaxheap-cmp @!nodes[self!find-left-child($right-child)] == Order::More {
TITSUKI/Algorithm-MinMaxHeap
…/MinMaxHeap.pm6 :233:
if not $smallest-value.defined or $smallest-value minmaxheap-cmp @!nodes[self!find-right-child($right-child)] == Order::More {
TITSUKI/Algorithm-MinMaxHeap
…/MinMaxHeap.pm6 :252:
if not $largest-value.defined or $largest-value minmaxheap-cmp @!nodes[$left-child] == Order::Less {
TITSUKI/Algorithm-MinMaxHeap
…/MinMaxHeap.pm6 :259:
if not $largest-value.defined or $largest-value minmaxheap-cmp @!nodes[self!find-left-child($left-child)] == Order::Less {
TITSUKI/Algorithm-MinMaxHeap
…/MinMaxHeap.pm6 :266:
if not $largest-value.defined or $largest-value minmaxheap-cmp @!nodes[self!find-right-child($left-child)] == Order::Less {
TITSUKI/Algorithm-MinMaxHeap
…/MinMaxHeap.pm6 :275:
if not $largest-value.defined or $largest-value minmaxheap-cmp @!nodes[$right-child] == Order::Less {
TITSUKI/Algorithm-MinMaxHeap
…/MinMaxHeap.pm6 :282:
if not $largest-value.defined or $largest-value minmaxheap-cmp @!nodes[self!find-left-child($right-child)] == Order::Less {
TITSUKI/Algorithm-MinMaxHeap
…/MinMaxHeap.pm6 :289:
if not $largest-value.defined or $largest-value minmaxheap-cmp @!nodes[self!find-right-child($right-child)] == Order::Less {
TITSUKI/Algorithm-MinMaxHeap
…/CmpOperator.pm6 :7:
multi sub infix:<minmaxheap-cmp>(Mu $lhs, Mu $rhs) is export {
TITSUKI/Algorithm-MinMaxHeap
…/CmpOperator.pm6 :11:
multi sub infix:<minmaxheap-cmp>(Algorithm::MinMaxHeap::Comparable $lhs, Algorithm::MinMaxHeap::Comparable $rhs) returns Order:D is export {
azawawi/farabi6
…/perl6-mode.js :303:
"from to infix postfix prefix circumfix postcircumfix minmax lazy count",
perl6/doc
…/operators.pod6 :42:
X | List infix | Z minmax X X~ X* Xeqv ... … ...^ …^
perl6/doc
…/operators.pod6 :2059:
=head2 infix C«minmax»
perl6/doc
…/operators.pod6 :2067:
10 minmax 3; # 3..10
perl6/doc
…/operators.pod6 :2070:
'10' minmax '3'; # "10".."3"
perl6/doc
…/operators.pod6 :2071:
'z' minmax 'k'; # "k".."z"
perl6/doc
…/operators.pod6 :2078:
1 minmax 1; # 1..1
perl6/doc
…/operators.pod6 :2085:
(10,20,30) minmax (0,11,22,33); # 0..33
perl6/doc
…/operators.pod6 :2086:
('a','b','z') minmax ('c','d','w'); # "a".."z"
perl6/doc
…/operators.pod6 :2095:
%winner minmax %loser;
perl6/doc
…/Any.pod6 :520:
=head2 method minmax
perl6/doc
…/Any.pod6 :524:
multi method minmax(--> Range:D)
perl6/doc
…/Any.pod6 :525:
multi method minmax(&filter --> Range:D)
perl6/doc
…/Any.pod6 :526:
multi sub minmax(+args, :&by!)
perl6/doc
…/Any.pod6 :527:
multi sub minmax(+args)
perl6/doc
…/Any.pod6 :536:
say (1,7,3).minmax(); # OUTPUT:«1..7␤»
perl6/doc
…/Any.pod6 :537:
say (1,7,3).minmax({-$_}); # OUTPUT:«7..1␤»
perl6/doc
…/Any.pod6 :538:
say minmax(1,7,3); # OUTPUT: «1..7␤»
perl6/doc
…/Any.pod6 :539:
say minmax(1,7,3,:by( -* )); # OUTPUT: «7..1␤»
perl6/doc
…/Range.pod6 :234:
=head2 method minmax
perl6/doc
…/Range.pod6 :238:
multi method minmax(Range:D: --> List:D)
perl6/doc
…/Range.pod6 :250:
say $r1.minmax, ', ', $r2.minmax; # OUTPUT: «(1 5), (2 5)␤»
perl6/doc
…/Range.pod6 :255:
say $r3.minmax; # OUTPUT: «(1.1 5.2)␤»
perl6/doc
…/Range.pod6 :256:
say $r4.minmax;
perl6/doc
…/Range.pod6 :258:
# OUTPUT: «X::AdHoc: Cannot return minmax on Range with excluded ends␤»
perl6/doc
…/Supply.pod6 :639:
=head2 method minmax
perl6/doc
…/Supply.pod6 :641:
method minmax(Supply:D: &custom-routine-to-use = &infix:<cmp> --> Supply:D)
perl6/doc
…/Supply.pod6 :645:
the comparator, just as with L<Any.minmax|/type/Any#method_minmax>.
perl6/doc
…/words.pws :670:
minmax
pierre-vigier/Perl6-Math-Matrix
…/Matrix.pm6 :201:
method Range( Math::Matrix:D: --> Range) { self.list.minmax }
pierre-vigier/Perl6-Math-Matrix
…/Matrix.pm6 :747:
self!check-row-index($rows.minmax[1]) unless $rows.max == Inf;
pierre-vigier/Perl6-Math-Matrix
…/Matrix.pm6 :748:
self!check-column-index($columns.minmax[1]) unless $columns.max == Inf;
pierre-vigier/Perl6-Math-Matrix
…/Matrix.pm6 :761:
self!check-row-index($rows.minmax[1]) unless $rows.max == Inf;
pierre-vigier/Perl6-Math-Matrix
…/Matrix.pm6 :762:
self!check-column-index($columns.minmax[1]) unless $columns.max == Inf;
scovit/Scheduler-DRMAA
…/Job-template.pm6 :280:
my ($start, $end) = $range.minmax;
viklund/november
…/norm.t :18:
my ($min, $max) = @in.minmax.bounds;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment