#lang scheme/base ;; Combinators built on top of control.ss ;; Higher order control combinators are built on top of the Forth ;; ones. This module does not re-export any of the control-stack ;; operators, to enforce a clean Coma + Control combinators language. (require "../tools.ss" "../coma.ss" "control.ss") (provide (all-defined-out)) ;; HIGHER ORDER MACROS ;; Written in terms of Forth style control words. Note that to provide ;; a clean Coma language with higher order control macros, these need ;; to be implementented in a different module, so the lowlevel Forth ;; control words and control stack manipulation can be hidden. (patterns (macro) (([qw a] [qw b] ifte) (macro: if ',a i else ',b i then)) (([qw a] forever) (macro: begin ',a i again)) )