www.delorie.com/gnu/docs/guile/guile_257.html   search  
 
Buy GNU books!


Guile Reference Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

23.2.2 let-keywords Reference

let-keywords and let-keywords* are used for extracting values from argument lists which use keywords instead of argument position for binding local variables to argument values.

let-keywords binds all variables simultaneously, while let-keywords* binds them sequentially, consistent with let and let* (see section 25.2 Local Variable Bindings).

library syntax: let-keywords rest-arg allow-other-keys? (binding ...) expr ...
library syntax: let-keywords rest-arg allow-other-keys? (binding ...) expr ...
These macros pick out keyword arguments from rest-arg, but do not modify it. This is consistent at least with Common Lisp, which duplicates keyword arguments in the rest argument. More explanation of what keyword arguments in a lambda list look like can be found below in the documentation for lambda* (see section 23.2.3 lambda* Reference). bindings can have the same form as for let-optional. If allow-other-keys? is false, an error will be thrown if anything that looks like a keyword argument but does not match a known keyword parameter will result in an error.

After binding the variables, the expressions expr ... are evaluated in order.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003