diff options
author | Robby Zambito <contact@robbyzambito.me> | 2023-02-21 16:53:25 -0500 |
---|---|---|
committer | Robby Zambito <contact@robbyzambito.me> | 2023-02-21 16:53:25 -0500 |
commit | 26197ab6e647ae9e37fb56f7844cf711fc10409c (patch) | |
tree | 976799445f48ba2d9f52f9b481b3323e20249dd0 /lib/zambyte/meta/chibi.scm | |
parent | c834a7b777556e5e5b960686e7769060d058e1b2 (diff) |
Bring SRFI 180 up to feature parity
Record mutators may not mutate the record in place.
Mutating an empty object should return a new object if it cannot be mutated.
Diffstat (limited to 'lib/zambyte/meta/chibi.scm')
-rw-r--r-- | lib/zambyte/meta/chibi.scm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/zambyte/meta/chibi.scm b/lib/zambyte/meta/chibi.scm index 856e1b8..3ce8192 100644 --- a/lib/zambyte/meta/chibi.scm +++ b/lib/zambyte/meta/chibi.scm @@ -46,7 +46,7 @@ (set-cdr! (assoc key json) value) json) ((null? json) - (error "json-object-set!: cannot set on an empty object" json)) + (json-object (cons key value))) ((list? json) (append! json (list (cons key value)))) ((json-record? json) |