Skip to content

Commit

Permalink
Use binding in react implementation
Browse files Browse the repository at this point in the history
Note this only helps for 6.c; the 6.d case implementation of react
isn't impacted by this.
  • Loading branch information
jnthn committed Jan 15, 2018
1 parent e5f412d commit 229b03f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/Supply.pm
Expand Up @@ -2211,8 +2211,8 @@ sub WHENEVER(Supply() $supply, &block) {
}

sub REACT(&block) {
my $s = SUPPLY(&block);
my $p = Promise.new;
my $s := SUPPLY(&block);
my $p := Promise.new;
$s.tap(
{ warn "Useless use of emit in react" },
done => { $p.keep(Nil) },
Expand All @@ -2229,8 +2229,8 @@ sub SUPPLY-ONE-WHENEVER(&block) {
}

sub REACT-ONE-WHENEVER(&block) {
my $s = SUPPLY-ONE-WHENEVER(&block);
my $p = Promise.new;
my $s := SUPPLY-ONE-WHENEVER(&block);
my $p := Promise.new;
$s.tap(
{ warn "Useless use of emit in react" },
done => { $p.keep(Nil) },
Expand Down

0 comments on commit 229b03f

Please sign in to comment.