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 v6.d; | |
enum Meat <Chicken Beef Pork Fish Veggie>; | |
enum Ingredient <Cheese Rice Beans Salsa Guacamole SourCream Lettuce Tomato Onion Cilantro PicoDeGallo>; | |
subset Burritoish where Meat | Ingredient; | |
sub return-burrito($meat, @ingredients) { | |
$meat, @ingredients |
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 v6; | |
constant transporter = -> { :1a, :2a; } | |
use foo transporter; |
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
my \l = ("Hello", "bye", ("something", ("list", "foo", "boo"), ("mars", "bar"))); | |
sub tree-it($item) { | |
my %h is default(IterationEnd) = $item.pairs; | |
do for 0..* -> $idx { | |
last if %h{$idx}:!exists; | |
my $left = %h{$idx}; | |
my $right = %h{$idx + 1}; | |
dd $right; |
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
role LoL { | |
method AT-POS() {...} | |
method head() {...} | |
method tail() {...} | |
} | |
role HoH { | |
method AT-KEY() {...} | |
} |
This file has been truncated, but you can view the full file.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Converted POD6 documentation</title> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | |
<style type="text/css"> | |
body { margin-left: 4em; margin-right: 4em; } | |
p { | |
text-rendering: optimizeLegibility; | |
font-feature-settings: "kern" 1; |
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
===> Searching for: hide-methods, InterceptAllMethods, Method::Also, Object::Delayed, Object::Trampoline | |
===> Staging Method::Also:ver<0.0.8>:auth<zef:lizmat> | |
===> Staging [OK] for Method::Also:ver<0.0.8>:auth<zef:lizmat> | |
===> Staging InterceptAllMethods:ver<0.0.3>:auth<zef:lizmat> | |
===> Staging [OK] for InterceptAllMethods:ver<0.0.3>:auth<zef:lizmat> | |
===> Staging Object::Trampoline:ver<0.0.12>:auth<zef:lizmat> | |
===> Staging [OK] for Object::Trampoline:ver<0.0.12>:auth<zef:lizmat> | |
===> Staging hide-methods:ver<0.0.6>:auth<zef:lizmat> | |
===> Staging [OK] for hide-methods:ver<0.0.6>:auth<zef:lizmat> | |
===> Staging Object::Delayed:ver<0.0.13>:auth<zef:lizmat> |
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
my \a = (42 & 42).defined; | |
dd a; | |
my \b = (42 & 42).Str; | |
dd b; |
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
#! /usr/bin/env raku | |
use v6.d; | |
use lib $*PROGRAM.resolve.dirname; | |
use util; | |
sub MAIN() { | |
put ‘I'm doing a thing.’; | |
put i-am-helpful; |
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
my atomicint $spawn-limit = 8; | |
multi sub spawn(&c, |args) { | |
# dd ⚛$spawn-limit; | |
⚛$spawn-limit > 0 | |
?? ($spawn-limit⚛-- ;start { LEAVE $spawn-limit⚛++; c(|args) }) | |
!! c(|args) | |
} | |
sub collect(*@things) { | |
slip @things.map: -> $thing { $thing ~~ Promise ?? await $thing !! $thing } |
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
my @a = 'Raku' xx 2**16; | |
sub foo([]) { } | |
foo(@a); |
NewerOlder