# HG changeset patch # User Steve Losh # Date 1509758095 14400 # Node ID ae1e2b337e30c0e479f3d4127404227fca6ae79a # Parent acbc94b1fbe71b90ce20f90b273fd81eec40f9a7 Export `invoke-...` diff -r acbc94b1fbe7 -r ae1e2b337e30 docs/03-reference.markdown --- a/docs/03-reference.markdown Fri Nov 03 21:12:09 2017 -0400 +++ b/docs/03-reference.markdown Fri Nov 03 21:14:55 2017 -0400 @@ -192,6 +192,48 @@ +### `INVOKE-GENERATE` (function) + + (INVOKE-GENERATE EXPRESSION) + +Generate a single Chancery expression. + + THIS FUNCTION IS EXPERIMENTAL AND SUBJECT TO CHANGE IN THE FUTURE. + + Because this is a function, not a macro, you'll need to do the quoting + yourself: + + (define-rule x 1 2 3) + + (generate (x x x)) + ; => (1 3 3) + + (invoke-generate '(x x x)) + ; => (2 1 2) + + + +### `INVOKE-GENERATE-STRING` (function) + + (INVOKE-GENERATE-STRING EXPRESSION) + +Generate and stringify a single Chancery expression. + + THIS FUNCTION IS EXPERIMENTAL AND SUBJECT TO CHANGE IN THE FUTURE. + + Because this is a function, not a macro, you'll need to do the quoting + yourself: + + (define-string x 1 2 3) + + (generate-string (x x x)) + ; => "1 3 3" + + (invoke-generate-string '(x x x)) + ; => "2 1 2" + + + ### `POS` (function) (POS STRING) diff -r acbc94b1fbe7 -r ae1e2b337e30 package.lisp --- a/package.lisp Fri Nov 03 21:12:09 2017 -0400 +++ b/package.lisp Fri Nov 03 21:14:55 2017 -0400 @@ -10,6 +10,9 @@ :generate :generate-string + :invoke-generate + :invoke-generate-string + :quote :eval :list