Files
devops/perl/Examples/Chap7/combine2
2025-09-17 16:08:16 +08:00

18 lines
256 B
Plaintext

###
### combine2
###
## Chapter 7 section 1
sub combine2 {
my $op = shift;
return sub {
my ($s, $t) = @_;
return unless $s && $t;
node($op->(head($s), head($t)),
promise { combine2($op)->(tail($s), tail($t)) });
};
}