View Full Version : A problem with scheme syntax
Cronox1
04-16-2004, 11:45 AM
I'm using DrScheme and wanted to see can anyone figure out why when i give certain forms im given weird errors even when they should not be there for instance I give
(car '(123 245))
and I get the error
quote: expected a name after a ', found something else
or ill give
(list 'a)
and instead of getting (a) back i get
(cons 'a empty)
Thanks for any help.
inkedmn
05-07-2004, 10:05 AM
> (car '(123 456))
123
> (list 'a)
(a)
works fine here, what scheme implementation are you using? (mine is mzscheme, btw)
Strike
05-07-2004, 12:33 PM
Originally posted by inkedmn
> (car '(123 456))
123
> (list 'a)
(a)
works fine here, what scheme implementation are you using? (mine is mzscheme, btw)
He's using DrScheme :)
By the way,
(cons 'a empty)
is identical to
(a)
I believe
jemfinch
05-10-2004, 10:01 PM
DrScheme provides different languages; you're using a more elementary language that doesn't include the " 'expr " syntax shortcut. If you're far enough along in Scheme to understand the things you should see, you should turn down the learner-ishness of it :)
Jeremy
vBulletin® v3.7.0, Copyright ©2000-2010, Jelsoft Enterprises Ltd.