Welcome to the CHICKEN Scheme pasting service

Eval'ing imported functions pasted by misilver on Sun Oct 30 20:52:53 2016

;;; hello.scm
(module hello (say-hello)
  (import chicken scheme)
  (define (say-hello)
    "hello"))

;;; goodbye.scm
(module goodbye *

(import chicken scheme)
(use ports hello)

(define (say-goodbye)
  "goodbye")

(print (string-append (say-hello) (say-goodbye)))    ; prints "hellogoodbye"

;; Fails because say-hello and say-goodbye are not defined in the eval
;; environment, which defaults to (interaction-environment).
(print (eval (with-input-from-string "(string-append (say-hello) (say-goodbye))" read)))
)

split into three files added by evhan on Sun Oct 30 21:19:32 2016

;;; hello.scm
(module hello (say-hello)
  (import chicken scheme)
  (define (say-hello)
    "hello"))

;;; goodbye.scm
(module goodbye *

(import chicken scheme)
(use ports hello)

(define (say-goodbye)
  "goodbye"))

;;; usage.scm
(eval '(use hello goodbye))
(print (eval '(string-append (say-hello) (say-goodbye))))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which egg provides `take-right'?
Visually impaired? Let me spell it for you (wav file) download WAV