1
;;; examples/box-dynamic-module/box-mixed.scm -- Scheme module using some
2
;;; functionality from the shared library libbox-module, but do not
3
;;; export procedures from the module.
7
;;; This is the Scheme module box-mixed. It uses some functionality
8
;;; from the shared library libbox-module, but does not export it.
12
;;; Author: Thomas Wawrzinek
14
;;; Changed: 2001-06-14 by martin, some commenting, cleanup and integration.
16
(define-module (box-mixed))
18
;; First, load the library.
20
(load-extension "libbox-module" "scm_init_box")
22
;; Create a list of boxes, each containing one element from ARGS.
24
(define (make-box-list . args)
30
;; Map the procedure FUNC over all elements of LST, which must be a
31
;; list of boxes. The result is a list of freshly allocated boxes,
32
;; each containing the result of an application of FUNC.
33
(define (box-map func lst)
36
(box-set! b (func (box-ref el)))
40
;; Export the procedures, so that they can be used by others.
42
(export make-box-list box-map)