RosettaCodeData/Task/Associative-array-Merging/Racket/associative-array-merging.rkt
2023-07-01 13:44:08 -04:00

16 lines
401 B
Racket

#lang racket/base
(require racket/hash)
(module+ test
(require rackunit)
(define base-data (hash "name" "Rocket Skates"
"price" 12.75
"color" "yellow"))
(define update-data (hash "price" 15.25
"color" "red"
"year" 1974))
(hash-union base-data update-data #:combine (λ (a b) b)))