summaryrefslogtreecommitdiff
path: root/examples/curry.m4
diff options
context:
space:
mode:
Diffstat (limited to 'examples/curry.m4')
-rw-r--r--examples/curry.m47
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/curry.m4 b/examples/curry.m4
new file mode 100644
index 0000000..00997c3
--- /dev/null
+++ b/examples/curry.m4
@@ -0,0 +1,7 @@
+divert(`-1')
+# curry(macro, args)
+# Expand to a macro call that takes one argument, then invoke
+# macro(args, extra).
+define(`curry', `$1(shift($@,)_$0')
+define(`_curry', ``$1')')
+divert`'dnl