array literal and Tail Call Optimization
Posted: Sun May 04, 2014 1:27 pm
Hello everyone,
I found it is same that array literal with list literal, but they are different datatype.
(list? (array 3)) => nil
(array 3) => (nil nil nil)
'(nil nil nil) => (nil nil nil)
(list? '(nil nil nil) => true
other question, When I run:
My comuter could not print result in ten minutes.
I like recursion, newLISP Hav not Tail Call Optimization?
I found it is same that array literal with list literal, but they are different datatype.
(list? (array 3)) => nil
(array 3) => (nil nil nil)
'(nil nil nil) => (nil nil nil)
(list? '(nil nil nil) => true
other question, When I run:
Code: Select all
>[cmd](define (fibonacci n)
(if (< n 2)
1
(+ (fibonacci (- n 1))
(fibonacci (- n 2)))))
[/cmd]
>(fibonacci 100)
I like recursion, newLISP Hav not Tail Call Optimization?