Strictly speaking, all functions that iterate over all elements of the list (say, takes its length) are buggy: They will not terminate if given an infinite list.
I think that you have a curious definition of the term "buggy".
This definition is as buggy as the rest of the world (perhaps
infinite...), or more. You like to play with words. Now the
non-termination is "buggy". Previously the bottom
(non-termination) was impure. Do you really want to save the
humanity with such statements?
Jerzy Karczmarczuk