On 10/14/22 4:32 AM, Elizabeth Mattijsen wrote:
I cannot reproduce:

% cat lib/A.rakumod
sub postfix:<!> ($n) is export {
     when $n == 0 {return 1}
     default {$n * ($n - 1)!}
}
% raku -e 'use lib "lib"; use A; say 42!'
1405006117752879898543142606244511569936384000000000

Very helpful. I have 6 subs in my module and all 6 work correctly when invoked from the system command line.

# Verify version
raku -e 'use lib "lib"; use SequenceHelper; say ver()';
# v0.0.1

# Verify factorial operator
raku -e 'use lib "lib"; use SequenceHelper; say 42!';
# 1405006117752879898543142606244511569936384000000000

# Verify double factorial operator
raku -e 'use lib "lib"; use SequenceHelper; say 5!!';
# 15

# Generate a sequence using genSeq_IndexOps
raku -e 'use lib "lib"; use SequenceHelper; say genSeq_IndexOps(5, -> $x {3**$x + 5**$x + 6**$x})';
# [3 14 70 368 2002]

# Generate a sequence using genSeq_ArrayOps
raku -e 'use lib "lib"; use SequenceHelper; say genSeq_ArrayOps(11, -> $x, @z {@z[$x-1] + @z[$x-2]}, <0 1>)';
# [0 1 1 2 3 5 8 13 21 34 55]

#Verify Palindrome detector
raku -e 'use lib "lib"; use SequenceHelper; say is-palindrome("noon")';

#True

Each of these results is correct. So, the problem remains that some subs are not found when invoked either from a test script or from the REPL.

Is there some cache that I must clear when changing a .rakumod file to prevent my system from hanging on to old material?

Regards,

Joe


Reply via email to