<div dir="ltr">Dear Racket Users,<br>I am learning racket and I found little bit misleading statement on guide [1]. It says that "<b>Both the my-length and my-map functions run in O(n) time for a list of length n.</b>". Technically this statement is correct but when I read below<br><br>"<b>For a list with n elements, evaluation will stack up n (+ 1 ...) additions, and then finally add them up when the list is exhausted.<br><br>You can avoid piling up additions by adding along the way. To accumulate a length this way, we need a function that takes both a list and the length of the list seen so far; the code below uses a local function iter that accumulates the length in an argument len</b>".<br><br>so just curious, shouldn't it be "<b>Both the my-length and my-map functions run in O(n) space for a list of length n.</b><span class="sewxpurehfscn19"></span><span class="sewxpurehfscn19"></span>" ?<br><br><br>-Mukesh Tiwari<br><br><br><br>[1]<a href="http://docs.racket-lang.org/guide/Lists__Iteration__and_Recursion.html#%28part._tail-recursion%29">http://docs.racket-lang.org/guide/Lists__Iteration__and_Recursion.html#%28part._tail-recursion%29</a></div>