# This file contains some very basic Raku code that serves as
# a base for localizations.  It is Raku code such as a programmer
# would write, rather than how Raku would deparse this code in
# English.

{
    ENTER say "hello";
    LEAVE say "goodbye";
}

sub answer() returns Int is raw { 42 }

my class Frobnicate {
    has $.a = 666;
    submethod TWEAK() {
        $!a = 42;
    }
    multi method foo {
        say self.a
    }
}

say Frobnicate.new.foo;

my $a = 41;
my $b where * >= 666 = 666;

say $b R/ $a;

say 42 (elem) 1..100;

if $a {
    $a++;
}
elsif $b {
    die "That is not the right number!";
}
else {
    note "Shouldn't see this";
}

say "incremented" if $a == answer;

with $a {
    say $a;
}
orwith $b {
    warn "still not the right number";
}

given 666 {
    when 42 {
        say "the answer";
    }
    default {
        quietly warn "No answer";
    }
}

no strict;
$c = 137;
dd $c.indent(4);

use strict;
my @a = ^10;
say @a.first(* %% 2, :end);

my %h = a => 666;
say %h<a>:delete;

put qq:to/HERE/;
heredoc
HERE

for ^3 { .say }

.say for <a b c>;

loop {
    say "loop";
    last;
}

my enum KNOBS <left right up down>;
say down;

my subset FOO of Int where * > 666;
my FOO $foo = 1000;
say $foo;

# vim: expandtab shiftwidth=4
