summaryrefslogtreecommitdiffstats
path: root/hash.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-10-30 16:54:19 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-10-30 16:54:19 -0700
commite7523b22158785bcd542f2abfe3a3e0d96b7b1ab (patch)
tree9bafdb4d9020d89bf69702c5205ab11a570ae616 /hash.c
parentadef4143af67eb8874e7013eb2c0b40da2099e5b (diff)
downloadtxr-e7523b22158785bcd542f2abfe3a3e0d96b7b1ab.tar.gz
txr-e7523b22158785bcd542f2abfe3a3e0d96b7b1ab.tar.bz2
txr-e7523b22158785bcd542f2abfe3a3e0d96b7b1ab.zip
lambda-set method: treat [struct ...] as place.
* eval.c (eval_init): Change registration of dwim-set to only one required argument, with the rest variadic. * lib.c (lambda_set_s): New symbol variable. (dwim_set): Change to variadic function that takes all arguments other than the object/sequence being operated on as struct args *. Rewrite to do a test on the object type first, handling hashes and structs specially. (obj_init): Initialize lambda_set_s. * share/txr/stdlib/place.tl (defplace dwim): Rewritten for more generic syntax. The only argument required is obj-place; the other arguments are treated as a variable argument list, all treated uniformly. This eliminates the special handling of the default value for hash lookups. * args.h (args_count): New inline function. * txr.1: Updated documentation for dwim operator, which neglects to mention use over objects thanks to the lambda function. Documented lambda-set.
Diffstat (limited to 'hash.c')
0 files changed, 0 insertions, 0 deletions