From 497f36b02e1056bafcb181a0d10fac7e3268130c Mon Sep 17 00:00:00 2001 From: Robby Zambito Date: Mon, 12 Jun 2023 00:22:30 -0400 Subject: Return the mutated object from record mutators. Update README --- lib/zambyte/meta/json.sld | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/zambyte/meta/json.sld') diff --git a/lib/zambyte/meta/json.sld b/lib/zambyte/meta/json.sld index 0802f94..32ce22c 100644 --- a/lib/zambyte/meta/json.sld +++ b/lib/zambyte/meta/json.sld @@ -133,7 +133,8 @@ (if (json-record? json) (or (and-let* ((pair (assoc 'name (json-record->mutators json))) (mut! (cdr pair))) - (mut! (json-record->internal-record json) value)) + (mut! (json-record->internal-record json) value) + json) (error (string-append (symbol->string 'mutator) ": no mutator for field") (json-record->name json) 'name)) (json-object-set! json 'name value))) (define-accessors-and-mutators rest :::))))) -- cgit