DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

(guile.info.gz) Running Guile Interactively

Info Catalog (guile.info.gz) Whirlwind Tour (guile.info.gz) Guile Scripts
 
 5.1 Running Guile Interactively
 ===============================
 
 In its simplest form, Guile acts as an interactive interpreter for the
 Scheme programming language, reading and evaluating Scheme expressions
 the user enters from the terminal.  Here is a sample interaction between
 Guile and a user; the user's input appears after the `$' and `guile>'
 prompts:
 
      $ guile
      guile> (+ 1 2 3)                ; add some numbers
      6
      guile> (define (factorial n)    ; define a function
               (if (zero? n) 1 (* n (factorial (- n 1)))))
      guile> (factorial 20)
      2432902008176640000
      guile> (getpwnam "jimb")        ; find my entry in /etc/passwd
      #("jimb" ".0krIpK2VqNbU" 4008 10 "Jim Blandy" "/u/jimb"
        "/usr/local/bin/bash")
      guile> C-d
      $
 
Info Catalog (guile.info.gz) Whirlwind Tour (guile.info.gz) Guile Scripts
automatically generated byinfo2html