Files
compiler-explorer/examples/raku/default.raku
timo bd80d171de Add raku language and rakudo compiler (#7784)
This relies on https://github.com/compiler-explorer/infra/pull/1658 to
put rakudo release versions in the right spot.


![image](https://github.com/user-attachments/assets/30ba7c2b-389a-4d3f-895b-c13da5b5f072)

There are more things that can be added, such as opcode tooltips,
suggested options for `--target=parse`, `--target=ast`,
`--target=optimize`, and probably other things I haven't thought of yet.
But this pull request should be a good starting point, and fine to merge
without waiting for further features.
2025-06-09 12:39:53 -05:00

16 lines
374 B
Raku

sub square($number) {
$number * $number
}
multi sub MAIN(Int $foo) {
say "When no one was looking, Lex Luthor took $foo cakes.";
say "The square of that is &square($foo) cakes.";
say "It's also roughly as much as $($foo div 10) tens.";
say "And that's terrible.";
}
multi sub MAIN() {
say "You can pass a number on the commandline if you like!"
}