Printer Friendly
The Free Dictionary
990,727,442 visitors served.
?
Dictionary/
thesaurus
Medical
dictionary
Legal
dictionary
Financial
dictionary
Acronyms
 
Idioms
Encyclopedia
Wikipedia
encyclopedia
?

head-strict

    0.06 sec.
(theory)head-strict - 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.

?Page tools
Printer friendly
Cite / link
Email
Feedback
? Mentioned in
 
Encyclopedia browser? ? Full browser
 
 
Encyclopedia
?

Disclaimer | Privacy policy | Feedback | Copyright © 2008 Farlex, Inc.
All content on this website, including dictionary, thesaurus, literature, geography, and other reference data is for informational purposes only. This information 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. Terms of Use.