function forEachCorner(extent, callback) {
  let val;
  val = callback(getBottomLeft(extent));
  if (val) {
    return val;
  }
  val = callback(getBottomRight(extent));
  if (val) {
    return val;
  }
  val = callback(getTopRight(extent));
  if (val) {
    return val;
  }
  val = callback(getTopLeft(extent));
  if (val) {
    return val;
  }
  return false;
}
This function calls `callback` for each corner of the extent. If the
callback returns a truthy value the function returns that value
immediately. Otherwise the function returns `false`.
@param {Extent} extent Extent.
@param {function(import("./coordinate.js").Coordinate): S} callback Callback.
@return {S|boolean} Value.
@template S