I am learning 61a from UCB using MITScheme.
For the first few chapters, I have been using windows (First download cygwin, then run XWin type emacs & and I get my emacs editor and REPL).
This has worked fine but I have switched to Ubuntu and I am using MIT Scheme. It has been working well but I recently ran into a problem.
[I am using Release 9.1 of MIT/GNU Scheme on Ubuntu and STk Interperter version 4.0.1 on Windows]
I am trying to write a black jack program.
I take the input as a hand of cards '(ad 8s 5h) [for ace diamond, 8 spades, 5 hearts].
To access the 'a value, the UCB lectures and the windows version are fine with:
(first (first '(ad 8s 5h))) ===> a
When I try this on Ubuntu MIT Scheme, I get the error:
The object ad, passed as an argument to safe-car, is not a pair.
After some testing I see that MIT scheme here will use first to extract the first item of a list:
(first '(ad 8s 5h)) =====> ad
But it will not use first as a selector for the first letter of a single word.
Can anybody give me a suggestion? I would like to keep learning this course on Ubuntu because it makes my life much easier in terms of saving and opening files for example.
Thanks,
AJ