Search code examples
schemeracketdr.racket

Unwanted quote mark when dealing with the simply-scheme package


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?


Solution

  • 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.