heads down

[Sun] Concentrating, usually so heavily and for so long that everything outside the focus area is missed. See also hack mode and larval stage, although this mode is hardly confined to fledgling hackers.

[Jargon File]



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.

Last updated: 1995-05-11

Nearby terms:

Head Normal Formhead normalisation theoremheads downhead-strictheap

Try this search on Wikipedia, Wiktionary, Google, OneLook.