in reply to Want for a name?
friends, neighbors, (over)laps
DB<106> sub friends (&@){ my $code=shift; $last=$_; my @result; for (@_) { push @result, $code->($last,$_); $last=$_; } return @result; } DB<107> friends { $_[0]+$_[1] } 1..5 => (1, 3, 5, 7, 9)
update
maybe "friendwise" in analogy to "pairwise" since "friend" is a noun
Cheers Rolf
( addicted to the Perl Programming Language)
In Section
Seekers of Perl Wisdom