#!/usr/bin/env scheme --script (define (foo) (set! x 1) ) (define (bar) y) (foo) (display x) (newline) (bar) (display y) (newline) ;; Result: ;; 1 ;; Exception: variable y is not bound