Module: dfmc-macro-expander Synopsis: Generate and compose functions to implement a template. Author: Keith Playford Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. All rights reserved. License: Functional Objects Library Public License Version 1.0 Dual-license: GNU Lesser General Public License Warranty: Distributed WITHOUT WARRANTY OF ANY KIND define constant = ; define constant = ; define macro match-method { match-method ?:body end } => { method (?=env :: ) => (value) ?body end } end macro; define method generate-template-function (elements :: ) => (constructor :: ) let functions = generate-template-elements-functions(elements); match-method // TODO: CORRECTNESS: Will fragments always be a list? let fragments = call-list-with-collecting(functions, env); if (empty?(fragments) | empty-template-elements?(fragments)) $the-empty-template else make(