/[guile]/guile/guile-core/doc/ref/scheme-procedures.texi
ViewVC logotype

Diff of /guile/guile-core/doc/ref/scheme-procedures.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by ossau, Fri Mar 15 14:03:53 2002 UTC revision 1.8 by ossau, Fri Mar 29 20:25:24 2002 UTC
# Line 727  all implemented as mmacros.) Line 727  all implemented as mmacros.)
727    
728  @deffn {Scheme Procedure} procedure->syntax code  @deffn {Scheme Procedure} procedure->syntax code
729  @deffnx {C Function} scm_makacro (code)  @deffnx {C Function} scm_makacro (code)
730  Return a @dfn{macro} which, when a symbol defined to this value  Return a macro which, when a symbol defined to this value appears as the
731  appears as the first symbol in an expression, returns the  first symbol in an expression, returns the result of applying @var{code}
732  result of applying @var{code} to the expression and the  to the expression and the environment.
 environment.  
733  @end deffn  @end deffn
734    
735  @deffn {Scheme Procedure} procedure->macro code  @deffn {Scheme Procedure} procedure->macro code
736  @deffnx {C Function} scm_makmacro (code)  @deffnx {C Function} scm_makmacro (code)
737  Return a @dfn{macro} which, when a symbol defined to this value  Return a macro which, when a symbol defined to this value appears as the
738  appears as the first symbol in an expression, evaluates the  first symbol in an expression, evaluates the result of applying
739  result of applying @var{code} to the expression and the  @var{code} to the expression and the environment.  For example:
 environment.  For example:  
740    
741  @lisp  @lisp
742  (define trace  (define trace
743    (procedure->macro    (procedure->macro
744     (lambda (x env) `(set! ,(cadr x) (tracef ,(cadr x) ',(cadr x))))))      (lambda (x env)
745          `(set! ,(cadr x) (tracef ,(cadr x) ',(cadr x))))))
746    
747  (trace @i{foo}) @equiv{} (set! @i{foo} (tracef @i{foo} '@i{foo})).  (trace @i{foo})
748    @equiv{}
749    (set! @i{foo} (tracef @i{foo} '@i{foo})).
750  @end lisp  @end lisp
751  @end deffn  @end deffn
752    

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26