@@ 1,22 1,28 @@
A small utility macro to allow defines in expression context of function bodies.
-Install it in your site-dir and import it using (use-modules (syntax def))
+Install it in your site-dir and import it using (use-modules (syntax define))
## Example
(use-modules (syntax def))
(def (divide-minus-one a b)
(when (= b 1) (error "We don't allow that here"))
- (def b* (- b 1))
+ (define b* (- b 1))
(/ a b*))
-This transforms all defines in expression context to (letrec ...). It also supports using (let! ...) and (let\*! ...) in expression
-context, but those are transformed into let and let* respectively, which has less overhead than letrec in guile.
+This transforms all defines in expression context to (letrec ...).
+
+## Supported forms
+The bodies of begin, lambda, define, let, let\*, letrec, letrec\*, case and cond are transversed and transformed.
+
+## Caveats
+
+This is a module-local transformation, thus macros imported from other modules don't allow this transformation.
## Portability
-The macros are currently written in syntax-case. If that isn't supported in your scheme, then tough luck.
+The macros are currently written in syntax-rules. If that isn't supported in your scheme, then tough luck.
## License
Permissified ISC.
## Documentation
-There is none, however there are is info in the source comments.
+There is none.