Skip to content

Instantly share code, notes, and snippets.

@wayland
Created August 26, 2023 11:45
Show Gist options
  • Save wayland/367998a78d71661fba065630aa1f062d to your computer and use it in GitHub Desktop.
Save wayland/367998a78d71661fba065630aa1f062d to your computer and use it in GitHub Desktop.
"next" error
class DataFlow::Node {}
my @a = ('Hi', 'world');
my $prev = Nil;
my @dfns = @a.map: {
my $dfn = DataFlow::Node.new();
$prev == Nil and next $dfn; # Don't link nodes on the ends
NEXT { $prev = $dfn }
$dfn;
};
$ docker exec raku raku test-pass.raku
Use of uninitialized value of type Any in numeric context
in block at test-pass.raku line 9
Use of Nil in numeric context
in block at test-pass.raku line 9
Cannot resolve caller next(DataFlow::Node:D); none of these signatures matches:
( --> Nil)
(Label:D $x --> Nil)
in block <unit> at test-pass.raku line 9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment