"diversion, amusement," 1727, earlier "a cheat, trick" (c.1700), from verb fun (1680s) "to cheat, hoax," of uncertain origin, probably a variant of Middle English fonnen "befool" (c.1400; see fond).
Stigmatized by Johnson as "a low cant word." Older sense is preserved in phrase to make fun of (1737) and funny money "counterfeit bills" (1938, though this may be more for the sake of the rhyme). See also funny.
A typed lambda-calculus, similar to SOL[2]. "On Understanding Types, Data Abstractions and Polymorphism", L. Cardelli et al, ACM Comp Surveys 17(4) (Dec 1985).