function useFoo({arr1, arr2}) {
  const cb1 = e => arr1[0].value + e.value;
  const x = arr1.map(cb1);
  const cb2 = e => arr2[0].value + e.value;
  const y = arr1.map(cb2);
  return [x, y];
}
Forked from array-map-simple.js

Whether lambdas are named or passed inline shouldn't affect whether we expect
it to be called.