[racket] Printing and doing something does neither - why?

From: Jos Koot (jos.koot at telefonica.net)
Date: Sun May 22 12:33:36 EDT 2011

Add a line like:
 
(bake "apple")
 
The define form defines a procedure, but nothing happens untill that
procedure is called.
Jos


  _____  

From: users-bounces at racket-lang.org [mailto:users-bounces at racket-lang.org]
On Behalf Of Carolyn Oates
Sent: 22 May 2011 18:18
To: users at racket-lang.org
Subject: [racket] Printing and doing something does neither - why?


Hi,
I am wanting to both print something and do something.
I found an example in the Racket guide p.20 sec.2.2.1
Only nothing comes back in the interactions.
It runs fine - no errors, but appears to do nothing.


Both printf and string-append are suppose to be in racket and racket/base.
Any ideas?
Thanks, Carolyn


The code: (using Racket ver.5.1.1)
#lang racket
(require racket/base)


(define (bake flavor)
(printf "pre-heating oven...\n")
(string-append flavor " pie"))


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20110522/9c9bcc69/attachment.html>

Posted on the users mailing list.