Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
First try on adding .assuming on Callable
  • Loading branch information
FCO committed Sep 15, 2017
1 parent 627de78 commit e9aa878
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/Callable.pm
@@ -1,6 +1,10 @@
my role Callable[::T = Mu] {
method of() { T }
method returns() { T }
method assuming(Callable:D $self: |primers) {
my &func = EVAL "-> {$self.signature.params>>.gist.join(", ")} \{ \$self.({$self.signature.params>>.name.join(", ")}) \}";
&func.assuming(|primers)
}
}

# vim: ft=perl6 expandtab sw=4

0 comments on commit e9aa878

Please sign in to comment.