Skip to content

Instantly share code, notes, and snippets.

@patrickbkr
Created January 6, 2025 21:55
my $s1 = supply { emit 1; emit 2 }
my $s2 = supply { emit 0 }
my $s3 = supply { whenever $s1 {
if $_ == 1 {
whenever $s2 { emit $_; }
}
else { emit $_; }
}
}
react whenever $s3 { say $_ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment