follow Dictionary.com

11 Trending Words of 2014

head-strict

head-strict in Technology

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)

The Free On-line Dictionary of Computing, © Denis Howe 2010 http://foldoc.org
Cite This Source

Word of the Day

Word Value for head

8
7
Scrabble Words With Friends

Quotes with head-strict

Nearby words for head-strict