<div class="gmail_quote">2010/9/18 Daniel Fischer <span dir="ltr">&lt;<a href="mailto:daniel.is.fischer@web.de">daniel.is.fischer@web.de</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im"><br></div><div class="im">
&gt;      n_lastn n = reverse . take n . reverse<br>
<br>
</div>Which is the most elegant definition, but it&#39;s an O(length list) space<br>
operation (as are all others proposed so far). T</blockquote></div><br><div>No!. You forget laziness!.  it is 0(n) with n= the parameter passed to n_lastn. </div><div><br></div><div>It is not  O(length list).</div><div><br>

</div><div>the reversed and de-reversed elements are just the ones being taken , not the whole list.</div><div><br></div><div>(please kill me if I´m wrong. I don´t want to live in a world where beauty is inneficient) </div>

<div><br></div><div>;)</div>