Wiki
Download
Manual
Eggs
API
Tests
Bugs
show
edit
history
You can edit this page using
wiki syntax
for markup.
Article contents:
== varg A template for defining dynamic arguments procedure. varg is hosted in codeberg: * [[https://codeberg.org/rikuri/varg.ss]] The latest document is: * [[https://codeberg.org/rikuri/varg.ss/src/branch/main/docs/usage.md]] ---- For convenient, here is a example from the link above. Note that example here may be out of date. <enscript highlight="scheme"> (import varg) (define (fun . args) (set! varg-output (varg '(#:with-value #:wi1 #:wi2) '(#:without-value #:wo1 #:wo2) '(#:literal #:li1 #:li2) args)) ; After the call of `fun` at the bottom, ; varg-output should be a list: '( (#:with-value (#:wi1 . 1)) ; #:wi2 does not appear ; because the call of `fun` at the bottom did not set it (#:without-value #:wo2) (#:literal "non-keyword1" "non-keyword2") ) ; Hence get values like this: (let ( (with-value (cdr (assoc #:with-value varg-output))) (without-value (cdr (assoc #:without-value varg-output))) (literal (cdr (assoc #:literal varg-output))) ) (print (cdr (assoc #:wi1 with-value))) ; this will be 1 (print (member #:wo2 without-value)) ; this will be equal to #t (print (member #:wo1 without-value)) ; this will be #f (print (list-ref literal 0)) ; this will "non-keyword1" (print (list-ref literal 1)) ; this will "non-keyword2" ) ) (fun '(#:wi1 . 1) #:wo2 "non-keyword1" "non-keyword2" ) </enscript> ----
Description of your changes:
I would like to authenticate
Authentication
Username:
Password:
Spam control
What do you get when you multiply 2 by 3?