Skip to content

Commit

Permalink
doesn't use a likned list directly because it's a weird thing to do i…
Browse files Browse the repository at this point in the history
…n Perl or Raku
  • Loading branch information
Simon Proctor committed May 4, 2020
1 parent 926adde commit c4d4ea6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions challenge-059/simon-proctor/raku/ch-1.raku
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env raku

use v6;

#| Given an inflaction point and a list of values put all the items less than the inflection point
#| at the start of the last and all those great or equal after. Retain ordering.
sub MAIN (
Int $inflection, #= Inflection point
*@rest where .all ~~ Int #= List of values
) {
my %c = @rest.classify( * >= $inflection );
( |%c{False}, |%c{True} ).say;
}

0 comments on commit c4d4ea6

Please sign in to comment.