conclusion: op is a failure who thought he knew something, but didn't
Name:
Anonymous2006-12-30 19:00
I didn't understand the OP until I read someone mention "professor", then I was like hahaha oh wow, but then I realized that was totally possible from remembering my professors.
Name:
Anonymous2006-12-30 19:04
I still don't understand the OP...?
Name:
Anonymous2006-12-31 6:58
(define (cons x y)
(lambda (f) (f x y)))
Name:
Anonymous2006-12-31 7:42
>>13 (define tmp car)
(define car cdr)
(define cdr tmp)
Name:
Anonymous2006-12-31 7:58
>>8
Or you could, y'know, just use a doubly linked list.
Name:
Anonymous2006-12-31 8:47
>>12
Appending to head of linked list == O(1)
Appending to end of linked list == O(n)
>>16
At some point in your code you're going to walk the entire list to get to the end... and anyone in that position would realize that that's retarded, and would immediately add a tail pointer to their implementation, or just insert their shit at the front.
Name:
Anonymous2006-12-31 19:02
>>21
A pointer to the end of the list has no other use besides adding elements to the end.
>>19
Unless you're writing code for an embedded device and don't have access to a large library, and don't want one either, since you have limited RAM...