0

Following the answer in this question I installed the simply-scheme package and ran the follwing code:

#lang simply-scheme
(se (butlast (bf "this"))
    "world")

But what I got is '(hi "world") rather than (hi "world"). Why is there an quote mark and how to fix it?

Mugenen
  • 103
  • 2

1 Answers1

0

I think this is just question of settings. In DrRacket, choose Language settings, Choose Language, Show Details, set Output Style to print or write, run your code again and compare outputs.

For #lang simply-scheme it seems to work like this:

print:

> (se (butlast (bf "this"))
    "world")

'(hi "world")

write:

> (se (butlast (bf "this"))
    "world")

(hi "world")

See also Output Printing Styles.

Martin Půda
  • 7,353
  • 2
  • 6
  • 13
  • Thanks for your help in such details! It's extremely helpful to me because I'm a very beginner to CS. – Mugenen May 01 '22 at 15:49