Skip to content

Instantly share code, notes, and snippets.

@lizmat
Created January 16, 2017 10:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lizmat/b9da3fbcf0cb0ab41e10c99f4b554bed to your computer and use it in GitHub Desktop.
Save lizmat/b9da3fbcf0cb0ab41e10c99f4b554bed to your computer and use it in GitHub Desktop.
Why does this break nodality tests 134-135 in t/spec/S03-metaops/hyper.t ??
diff --git a/src/core/Any-iterable-methods.pm b/src/core/Any-iterable-methods.pm
index a25c022..7b49351 100644
--- a/src/core/Any-iterable-methods.pm
+++ b/src/core/Any-iterable-methods.pm
@@ -1477,16 +1477,16 @@ Did you mean to add a stub (\{...\}) or did you mean to .classify?"
)
}
- proto method reduce(|) { * }
- multi method reduce(&with) is nodal {
- return unless self.DEFINITE;
+ proto method reduce(|) is nodal { * }
+ multi method reduce(Any:U: &with) { Nil }
+ multi method reduce(Any:D: &with) {
my $reducer := find-reducer-for-op(&with);
$reducer(&with)(self) if $reducer;
}
- proto method produce(|) { * }
- multi method produce(&with) is nodal {
- return unless self.DEFINITE;
+ proto method produce(|) is nodal { * }
+ multi method produce(Any:U: &with) { Nil }
+ multi method produce(Any:D: &with) {
my $reducer := find-reducer-for-op(&with);
$reducer(&with,1)(self) if $reducer;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment