18 lines
256 B
Plaintext
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)) });
|
|
};
|
|
}
|