What does the word function mean?

Usage examples for function

  1. Don't you know that this is a state function, got up to welcome you and Mr Benson? – By Veldt and Kopje by William Charles Scully
  2. The marriage ceremony in the Sologne is a great and very public function. – Castles and Chateaux of Old Touraine and the Loire Country by Francis Miltoun