Implement map()...with bugs
Perl

sub mymap (&amp;@) {
  my $fn = shift;
  my @ret;
  while (my $val = shift) {
    local $_ = $_[0]; # map calling convention is element in $_
    push @ret, $fn-&gt;();
  }
  return @ret;
}


Looks plausible for at least a moment, until you have the sense to go "why isn't he using $val?"