Handbook
Glossary
assoc-zip-with ( quot: ( key value -- calc ) -- alist )
Vocabulary
sequences
.
extras
Inputs
quot
a
quotation
Outputs
alist
an array of key/value pairs
Word description
Applies
quot
to each key-value pair in the given assoc, pushing a new assoc with the key-value pairs as keys, and the values computed by
quot
as values.
Definition
USING:
arrays
assocs
kernel
;
IN:
sequences.extras
:
assoc-zip-with
( quot: ( key value -- calc ) -- alist )
[
2keep
2array
swap
]
curry
assoc-map
;
inline