Head-strict


theory
A head-strict function will not necessarily evaluate every cons cell of its (list) argument, but whenever it does evaluate a cons cell it will also evaluate the element in the head of that cell. An example of a head-strict function is
beforeZero :: [Int] -> [Int] beforeZero [] = [] beforeZero (0:xs) = [] beforeZero (x:xs) = x : beforeZero xs
which returns a list up to the first zero.
This pattern of evaluation is important because it is common in functions which operate on a list of inputs.
See also tail-strict, hyperstrict.
(1995-05-11)

Read Also:

  • Headstrong

    [hed-strawng, -strong] /ˈhɛdˌstrɔŋ, -ˌstrɒŋ/ adjective 1. determined to have one’s own way; willful; stubborn; obstinate: a headstrong young man. 2. proceeding from or exhibiting willfulness: a headstrong course. /ˈhɛdˌstrɒŋ/ adjective 1. self-willed; obstinate 2. (of an action) heedless; rash adj. “determined to have one’s way,” late 14c., from head (n.) + strong. Cf. Old English […]

  • Heads-up

    [hedz-uhp] /ˈhɛdzˌʌp/ adjective 1. quick to grasp a situation and take advantage of opportunities; alert; resourceful. noun 2. a warning in advance: sending a heads-up to the Pentagon about possible attacks. [hed] /hɛd/ noun 1. the upper part of the body in humans, joined to the trunk by the neck, containing the brain, eyes, ears, […]

  • Heads-up display

    [hedz-uhp] /ˈhɛdzˈʌp/ noun 1. an electronic display of data from instruments or other sources projected at eye level so that a driver or pilot sees it without looking away from the road or course. Abbreviation: HUD. 2. (in a computer game) an electronic display of meters and dials around the screen margins. Abbreviation: HUD.

  • Heads will roll

    sentence People will be dismissed, punished, ruined, etc: If eventually the authorities catch up with you, no heads will roll/ I promise you: if this package is not delivered on time, heads will roll [1930+; the source is a quotation from Adolf Hitler] Someone will be severely punished, as in If no one meets the […]

  • Head-table

    noun 1. the principal table, as at a banquet or conference, often at the head of a row of tables or raised on a dais, where the presiding officer, chief speaker, guests of honor, etc., are seated.


Disclaimer: Head-strict definition / meaning should not be considered complete, up to date, and is not intended to be used in place of a visit, consultation, or advice of a legal, medical, or any other professional. All content on this website is for informational purposes only.