A lazy set type which is backed by a lazy seq containing set items.

Order of items may change between two uses if the collection is not realized.

Most operations fully realize returned lazy set. Following ones do not realize, or only partially realize the returned lazy set:

lazy-seq→set

Available since version 1.0 (view source)

not referred automatically

Usage:
  • (lazy-seq->set items)

Type signature:
  • ([]) → #{}

Returns a lazy set backed by a given lazy seq items.

1
2
3
4
5
6
7
8
9
10
11
12
(ns foo.bar
  (:api dunaj)
  (:require [dunaj.coll.lazy-seq-set :refer [lazy-seq->set]]))

(lazy-seq->set [:a :b :c])
;;=> #{:a :b :c}

(def m (lazy-seq->set (range)))
;;=> #'foo.bar/m

(get m 61)
;;=> 61