Along with the book "Simply Scheme" (Second Edition) i'm watching the "Computer Science 61A - Lectures" on youtube. On the lectures , the tutor uses Stk interpreter, but i'm using chicken scheme interpreter.
In the first lecture he uses the "first" procedure which if it's called like :
(first 'hello)
it returns "h".
On the book of "Simply Scheme" it has an example of how first can be implemented:
(define (first sent)
(car sent))
Which to my testing and understanding works if sent is a list . I'm trying to understand if it's proper to say that "everything is a list" in scheme. To be more specific where's the list in 'hello and if there is one, why it doesn't work in first procedure as it's written in the book?
Also if every implementation is written with "everything is a list" in mind why the same code does not work in all scheme implementations?
first
has been redefined in Simply Scheme to work on symbols. See the package by @dyoo planet.plt-scheme.org/package-source/dyoo/simply-scheme.plt/2/2/… if you want to use Simply Scheme in DrRacket. – soegaard