function: [16] The ultimate source of function is the Latin verb fungī ‘perform, discharge’, which may be related to Sanskrit bhunkte ‘he enjoys’. From its past participle, functus, was formed the abstract noun functiō ‘performance, activity’, which passed into English via Old French fonction. Other English derivatives of fungī include defunct and perfunctory [16], etymologically ‘done only to discharge an obligation’. => defunct, perfunctory
1530s, "one's proper work or purpose; power of acting in a specific proper way," from Middle French fonction (16c.) and directly from Latin functionem (nominative functio) "a performance, an execution," noun of action from funct-, past participle stem of fungi "perform, execute, discharge," from PIE root *bheug- (2) "to use, enjoy" (see brook (v.)). Meaning "official ceremony" is from 1630s, originally in church use. Use in mathematics probably was begun by Leibnitz (1692). In reference to computer operations, 1947.