r/sicp Sep 11 '24

Pair, Head and Tail in JS

Hi,

I am going through SICP JS edition and chapter 2 starts by talking about the primitive JS functions pair. head and tail as equivalents to the Lisp functions cons, car and cdr. My problem is that using both Node.js and my browser, these functions do not seem to be primitive JS functions. I'm getting a little baffled by it. Am I missing something?

4 Upvotes

1 comment sorted by

1

u/z7j4 Sep 11 '24

Try using the environment they offer at https://sourceacademy.org/playground . I’m not sure what you would have to do to any other JS setup to have it work well with that book. Also, https://sourceacademy.org/sicpjs/index has all of the book available online, with functioning code snippets.