wisp
 
(Arne Babenhauserheide)
2013-12-31: try at improving the with-split-vk macro. support-scheme-macro-paren-quoting

try at improving the with-split-vk macro.

diff --git a/examples/tinyenc.w b/examples/tinyenc.w
--- a/examples/tinyenc.w
+++ b/examples/tinyenc.w
@@ -32,25 +32,17 @@ define : v1change k2 v0 sum k3
 ; TODO: Define a macro with-split-kv which executes its body with let bindings to k0 k1 k2 k3 v0 and v1
 ; http://www.gnu.org/software/guile/manual/html_node/Syntax-Case.html#index-with_002dsyntax
 define-syntax with-split-vk
-  lambda : x
-    syntax-case x :
-      : with-split-vk v k exp ...
-        with-syntax
-          : k0 : datum->syntax x 'k0
-            k1 : datum->syntax x 'k1
-            k2 : datum->syntax x 'k2
-            k3 : datum->syntax x 'k3
-            v0 : datum->syntax x 'v0
-            v1 : datum->syntax x 'v1
-          #' let
-            : k0 : uint32 : ash k -96
+    syntax-rules :
+      : with-split-vk v k exp exp* ...
+          let
+            : v0 : uint32 : ash v -32
+              v1 : uint32 v
+              k0 : uint32 : ash k -96
               k1 : uint32 : ash k -64
               k2 : uint32 : ash k -32
               k3 : uint32 k
-              v0 : uint32 : ash v -32
-              v1 : uint32 v
-            . exp ...
-    
+            . exp exp* ...
+
 
 define : encrypt v k
   . "Encrypt the 64bit (8 byte, big endian) value V with the 128bit key K (16 byte)."