First example:
This is a very short and silly story.would translate into Scheme as
(list 'This 'is 'a 'very 'short 'and 'silly 'story)or perhaps, using Scheme's list-building abbreviations,
'(This is a very short and silly story)
For a slightly more complex example, consider the story
Jill said, "Jack, come help me with this pail of water."This could be represented (using list-building abbreviations) as
'(Jill said (Jack come help me with this pail of water.))(I've omitted the commas, because they mean something special in Scheme.)
Finally, consider the somewhat contrived story
In the immortal words of J.F. Hooke,This might translate intoBill asked, "Will you tell me a story?" Jane replied, "My grandfather used to tell lots of stories. One evening before I went to bed I asked "Grandpa, tell me a story," and he saidThis passage illustrates the self-referential and deeply-nested nature of Hooke's later work, perhaps influenced by his ill-fated exposure to the Scheme programming language."It was a dark and stormy night. Three men sat in a small hut, shivering with cold and fear. To keep their minds off these problems, the eldest of the three decided to tell a story. He started,That was one of my favorites of Grandpa's stories. I hope you liked it," but Bill had fallen asleep.""It was a dark and stormy night. Three men sat in a small hut, shivering with cold and fear. To keep their minds off these problems, the eldest of the three decided to tell a story. He started,The second man said "That is not much of a story. Here is a better one:" but before he could even get started, the monster ate the hut and all three men in it. The end.""It was a dark and stormy night. Three men ---"but before he could finish the sentence, he was interrupted by a tidal wave that killed all three of them instantly. The end."
'(In the immortal words of J.F. Hooke, (Bill asked (Will you tell me a story?) Jane replied (My grandfather used to tell lots of stories. One evening before I went to bed I asked (Grandpa tell me a story,) and he said (It was a dark and stormy night. Three men sat in a small hut, shivering with cold and fear. To keep their minds off these problems the eldest of the three decided to tell a story. He started (It was a dark and stormy night. Three men sat in a small hut, shivering with cold and fear. To keep their minds off these problems the eldest of the three decided to tell a story. He started (It was a dark and stormy night. Three men ---) but before he could finish the sentence he was interrupted by a tidal wave that killed all three of them instantly. The end.) The second man said (That is not much of a story. Here is a better one:) but before he could even get started the monster ate the hut and all three men in it. The end.) That was one of my favorites of Grandpas stories. I hope you liked it) but Bill had fallen asleep.) This passage illustrates the self-referential and deeply-nested nature of Hooke's later work, perhaps influenced by his ill-fated exposure to the Scheme programming language.)
(define milk-chocolate (list 'sugar 'cocoa-butter 'milk 'chocolate 'natural-flavor 'soy-lecithin)) (define bittersweet-chocolate (list 'sugar 'chocolate 'cocoa-butter 'butter-oil 'natural-flavor 'soy-lecithin)) (define praline-paste (list 'hazelnuts 'sugar milk-chocolate bittersweet-chocolate)) (define powdered-sugar (list 'sugar 'corn-starch)) (define dark-chocolate (list 'sugar 'chocolate 'cocoa-butter 'butter-oil 'natural-flavor 'soy-lecithin)) (define hazelnut-swirl (list praline-paste 'corn-oil powdered-sugar dark-chocolate 'corn-starch 'cocoa-processed-with-alkali 'coconut-oil (list 'monoglycerides 'diglycerides) 'salt 'soy-lecithin)) (define semi-sweet-chocolate (list 'sugar 'chocolate 'cocoa-butter 'soy-lecithin)) (define thiamine-mononitrate 'vitamin-B1) (define riboflavin 'vitamin-B2) (define enriched-flour (list 'flour 'niacin 'reduced-iron thiamine-mononitrate riboflavin 'folic-acid)) (define chocolate-cookie-crumbs (list enriched-flour 'sugar (list 'partially-hydrogenated-soybean-oil 'partially-hydrogenated-cottonseed-oil 'partially-hydrogenated-canola-oil) 'cocoa-processed-with-alkali 'high-fructose-corn-syrup 'yellow-corn-flour 'chocolate 'salt 'dextrose 'baking-soda 'soy-lecithin)) (define chocolate-truffle-cake (list semi-sweet-chocolate 'cream chocolate-cookie-crumbs 'corn-syrup 'butter 'chocolate 'sugar 'natural-flavor)) (define godiva-chocolate-hazelnut-praline (list 'milk 'skim-milk 'cream hazelnut-swirl 'sugar chocolate-truffle-cake bittersweet-chocolate 'cocoa-processed-with-alkali 'egg-yolks 'natural-flavor 'guar-gum 'carob-bean-gum 'carrageenan 'dextrose))