By Letter: Non-alphabet | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
  Email this page to a friend


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.



< Previous Terms Terms Containing head-strict Next Terms >
Head Disk Assembly
header
Head Normal Form
head normalisation theorem
heads down
head-strict
tail-strict
heap
heartbeat
heatseeker
heat sink
heat slug


Web Standards & Support:

Link to and support eLook.org Powered by LoadedWeb Web Hosting
Valid XHTML 1.0!Valid CSS!eLook.org FireFox Extensions