! takes values from a hashtable and matches them against tuple's slots names, replacing the slots' values with the corresponding ones (unless the value is f). : slot-names ( mirror -- seq ) >alist [ first ] map ; : slot-values-from-hash ( hash seq -- slot-value-pairs ) [ [ swap at ] keep swap 2array ] with map [ second ] filter ; : set-mirror-slots ( mirror value-pairs -- mirror' ) over '[ first2 swap _ set-at ] each ; : values-to-slots ( hash mirror -- mirror' ) tuck slot-names slot-values-from-hash set-mirror-slots ; : hash>slots ( hash tuple -- tuple' ) values-to-slots object>> ;