<commit_before>use v6;

=begin pod

=TITLE Rabbits and Recurrence Relations

=AUTHOR grondilu

L<http://rosalind.info/problems/fib/>

Sample input

    5 3

Sample output

    19

=end pod

my ($n, $k) = get.words;
my @fib := 1, 1, * * $k + * ... *;

say @fib[$n-1];

# vim: expandtab shiftwidth=4 ft=perl6<commit_msg>[rosalind] handle default and command line input in fib example<commit_after>use v6;

=begin pod

=TITLE Rabbits and Recurrence Relations

=AUTHOR grondilu

L<http://rosalind.info/problems/fib/>

Sample input

    5 3

Sample output

    19

=end pod

sub MAIN(Int $n = 5, Int $k = 3) {
    my @fib := 1, 1, * * $k + * ... *;

    say @fib[$n-1];
}

# vim: expandtab shiftwidth=4 ft=perl6
{'fraction_non_alphanumeric': 0.14589235127478753, 'fraction_numerical': 0.031161473087818695, 'mean_word_length': 3.086705202312139, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3610869', 'n_tokens_mistral': 317, 'n_tokens_neox': 288, 'n_words': 83}