Word:
Browse
head smut
head start
Head stock
head teacher
head tone
head trip
head up
head voice
Head wind
head word
Head-cheese
Head-hunter
head-in-the-clouds
Head-lugged
head-on
head-shrinker
-- head-strict --
head-to-head
Headache
headache powder
Headachy
Headband
Headboard
Headborough
headcheese
headcount
headcounter
Headdress
Headed
Header
headfast
Headfirst
Headfish

head-strict

Advertisement
(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.

About this site and copyright information - Online Dictionary Home