Peter Neergaard <[EMAIL PROTECTED]>  writes

> I am doing a graduate student project with the aim of veryfying the result
> of Bird, Jones and de Moor that lazy languages has the same time complexity
> as impure Lisp on a problem proposed by Pippenger (The problem is solved in
> a strictly higher complexity by a pure Lisp than in an impure Lisp program).
> [...]


This is interesting. Could you provide a reference to these problem and 
result descriptions?


> [...]
> However, I cannot find any place describing whether the implementation 
> of ++ is supposed to be better than the straight-forward: 
>     [] ++ ys = ys 
>     (x:xs) ++ ys = x : (xs ++ ys)


Aiming the efficiency in operating with large lists, when they 
consitute the critical part of the algorithm, people usually avoid 
(++). Right?
Though, they say, it helps sometimes to represent the list  xs  as
the function  ys --> xs++ys  and replace (xs++) with the composition
of (x:). For example, this helps in printing of a binary tree.
Who knows, does there exist any systematic universalisation of this 
trick? 

Thanks in advance.


------------------
Sergey Mechveliani
[EMAIL PROTECTED]











Reply via email to