(retain! f deq)
  f: a callable
  deq: a deque
  returns #n
F

Filters a deque in-place.

Calls (f elem) for each element in the deque, removing those elements for which the call returns #f or #n.

(let digits (arr 0 9 1 8 2 7 3 6 4 5))
(retain! (fn1 (< _ 5)) digits)
(prn digits) ; prints (0 1 2 3 4)

See also: filter

map!
join