Ian Price writes: > This version of define-macro still fails on the original macros as > posted by Panicz Maciej Godek, but gives the "right" result using stis's > ck macro version. > > At 2:30am, I'm not liable to get to the bottom of why till tomorrow, but > I think doing something like this is a positive step. Turns out it was PEBKAC /tmp $ guile -q GNU Guile 2.0.9.95-c9e3-dirty Copyright (C) 1995-2013 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> (include "/tmp/defmacrofix.scm") scheme@(guile-user)> ,expand ((string-matches "([a-z])") "a") $1 = (let* ((string "a") (match-struct (string-match "([a-z])" string))) (and match-struct (let ((count (match:count match-struct))) (and count (map (lambda (n) (match:substring match-struct n)) (iota (#{1-}# count) 1)))))) -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"