Name

merge-by

Usage

builtin-function

Syntax

(merge-by key seq1 seq2)
(merge-by key comparer seq1 seq2)

Description

Merges two ordered sequences into one. Used by the function sort-by. The function key produces the values to compare. The default comparer is compare.

user 1 > (merge-by length '("a" "aaa" "aaaaa") '("bb" "bb" "bbbb" "bbbbbb"))
it: ("a" "bb" "bb" "aaa" "bbbb" "aaaaa" "bbbbbb")

See also

merge sort sort-by