X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=examples%2Fhello.scm;h=b8f2eb6e61e2abb0189eddde1391c801735ecdff;hb=487cd0d4c6c0ee9681cc132e5316ded7fc5dd0f7;hp=4f59cccf85f770a24df71e9b33c091a949a2089a;hpb=a2c12dede99c0d296194699e025a2e541c8a98a0;p=guile-click.git diff --git a/examples/hello.scm b/examples/hello.scm index 4f59ccc..b8f2eb6 100755 --- a/examples/hello.scm +++ b/examples/hello.scm @@ -25,13 +25,13 @@ (define hello (command - '((count (single-char #\c) (default 1) (help "Number of greetings.")) - (name (prompt "Your name") (help "The person to greet."))) - (lambda (count name) - "Simple program that greets NAME for a total of COUNT times." - (let loop ((times count)) - (cond ((> times 0) - (format #t "Hello ~a!~%" name) - (loop (- times 1)))))))) + #:option-spec '((count (single-char #\c) (default 1) (help "Number of greetings.")) + (name (prompt "Your name") (help "The person to greet."))) + #:procedure (lambda (count name) + "Simple program that greets NAME for a total of COUNT times." + (let loop ((times count)) + (cond ((> times 0) + (format #t "Hello ~a!~%" name) + (loop (- times 1)))))))) (hello (command-line))