Handbook
Glossary
write-field ( value quot -- value' )
Vocabulary
mongodb
.
tuple
.
persistent
.
private
Inputs
value
an
object
quot
an
object
Outputs
value'
an
object
Definition
USING:
accessors
assocs
bson
combinators
hashtables
kernel
linked-assocs
mongodb.tuple.collection
;
IN:
mongodb.tuple.persistent.private
:
write-field
( value quot -- value' )
<cond-value>
{
{
[
dup
value>>
mdb-special-value?
]
[
value>>
]
}
{
[
dup
value>>
mdb-persistent?
]
[
[
value>>
]
[
quot>>
]
bi
write-mdb-persistent
]
}
{
[
dup
value>>
data-tuple?
]
[
[
value>>
]
[
quot>>
]
bi
( tuple -- assoc )
call-effect
]
}
{
[
dup
value>>
[
hashtable?
]
[
linked-assoc?
]
bi
or
]
[
[
value>>
]
[
quot>>
]
bi
[
write-field
]
curry
assoc-map
]
}
[
value>>
]
}
cond
;