mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 09:23:52 -05:00
This relies on https://github.com/compiler-explorer/infra/pull/1658 to put rakudo release versions in the right spot.  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.
16 lines
374 B
Raku
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!"
|
|
}
|