listless definition programming
In functional programming
, a property of a function
which allows it to be combined with other functions in a way that eliminates intermediate data structures, especially lists.
Phil Wadler's thesis gives the conditions for a function to be in listless form: each input list is traversed only once, one element at a time, from left to right. Each output list is generated once, one element at a time, from left to right. No other lists are generated or traversed.
Not all functions can be expressed in listless form (e.g. reverse).