Lazymap is to maps what lazy-seq is to lists. It allows to store values with evaluating them. This is only done in case the value is really accessed. Lazymap works with any map type (hash-map, sorted-map, struct-map) and may be used as a drop-in replacement everywhere where a normal map type may be used.
Available macros: lazy-hash-map, lazy-sorted-map, lazy-struct-map, lazy-struct, lazy-assoc and their * counterpart functions.
Lazymap is to maps what lazy-seq is to lists. It allows to store values with evaluating them. This is only done in case the value is really accessed. Lazymap works with any map type (hash-map, sorted-map, struct-map) and may be used as a drop-in replacement everywhere where a normal map type may be used. Available macros: lazy-hash-map, lazy-sorted-map, lazy-struct-map, lazy-struct, lazy-assoc and their * counterpart functions.
(create-lazy-map base)
(create-lazy-map base metadata)
(create-lazy-map-seq inner-seq)
(create-lazy-map-seq inner-seq metadata)
(delayed-assoc m & kvs)
delayed-assoc is like lazy-assoc but a function and takes values as delays or futures instead of expanding into a delay/future of val.
delayed-assoc is like lazy-assoc but a function and takes values as delays or futures instead of expanding into a delay/future of val.
(delayed-hash-map & kvs)
delayed-hash-map is the same as lazy-hash-map except that its a function and it takes a seq of keys-delayed-value pairs.
delayed-hash-map is the same as lazy-hash-map except that its a function and it takes a seq of keys-delayed-value pairs.
(delayed-sorted-map & kvs)
delayed-sorted-map is the same as lazy-sorted-map except that its a function and it takes a seq of keys-delayed-value pairs.
delayed-sorted-map is the same as lazy-sorted-map except that its a function and it takes a seq of keys-delayed-value pairs.
(delayed-struct s & vs)
delayed-struct is the same as lazy-struct except that its a function and it takes a seq of delayed value together with the struct basis.
delayed-struct is the same as lazy-struct except that its a function and it takes a seq of delayed value together with the struct basis.
(delayed-struct-map s & kvs)
delayed-struct-map is the same as lazy-struct-map except that its a function and it takes a seq of keys-delayed-value pairs together with the struct basis.
delayed-struct-map is the same as lazy-struct-map except that its a function and it takes a seq of keys-delayed-value pairs together with the struct basis.
(future-assoc m & kvs)
future-assoc associates new values to the given keys in the given lazy map. The values are evaluated in a separate thread. They are evaluated at most once.
future-assoc associates new values to the given keys in the given lazy map. The values are evaluated in a separate thread. They are evaluated at most once.
(future-hash-map & kvs)
future-hash-map creates a map. The values are evaluated in a separate thread. Each value is evaluated at most once. The underlying map is a hash map.
future-hash-map creates a map. The values are evaluated in a separate thread. Each value is evaluated at most once. The underlying map is a hash map.
(future-sorted-map & kvs)
future-hash-map creates a map. The values are evaluated in a separate thread. Each value is evaluated at most once. The underlying map is a sorted map.
future-hash-map creates a map. The values are evaluated in a separate thread. Each value is evaluated at most once. The underlying map is a sorted map.
(future-struct s & vs)
future-hash-map creates a map. The values are evaluated in a separate thread. Each value is evaluated at most once. The underlying map is a struct map according to the provided structure s. As with Clojure's struct the values have to appear in the order of the keys in the structure.
future-hash-map creates a map. The values are evaluated in a separate thread. Each value is evaluated at most once. The underlying map is a struct map according to the provided structure s. As with Clojure's struct the values have to appear in the order of the keys in the structure.
(future-struct-map s & kvs)
future-hash-map creates a map. The values are evaluated in a separate thread. Each value is evaluated at most once. The underlying map is a struct map according to the provided structure s.
future-hash-map creates a map. The values are evaluated in a separate thread. Each value is evaluated at most once. The underlying map is a struct map according to the provided structure s.
ILazyMapEntry describes the behaviour of a lazy MapEntry. It provides an additional method (over IMapEntry), which returns the raw delay object and not the forced value.
ILazyMapEntry describes the behaviour of a lazy MapEntry. It provides an additional method (over IMapEntry), which returns the raw delay object and not the forced value.
(get-key lazy-map-entry)
Return the key of the map entry.
Return the key of the map entry.
(get-raw-value lazy-map-entry)
Return the underlying delay object.
Return the underlying delay object.
ILazyPersistentMap extends IPersistentMap with a method to allow transportation of the underlying delaying objects.
ILazyPersistentMap extends IPersistentMap with a method to allow transportation of the underlying delaying objects.
(delay-assoc lazy-map key delay)
Associates the given delay/future in the map.
Associates the given delay/future in the map.
(lazy-assoc m & kvs)
lazy-assoc associates new values to the given keys in the given lazy map. The values are not evaluated, before their first retrieval. They are evaluated at most once.
lazy-assoc associates new values to the given keys in the given lazy map. The values are not evaluated, before their first retrieval. They are evaluated at most once.
(lazy-assoc* m & kvs)
lazy-assoc* is like lazy-assoc but a function and takes values as delays instead of expanding into a delay of val.
Deprecated: Use delayed-assoc instead.
lazy-assoc* is like lazy-assoc but a function and takes values as delays instead of expanding into a delay of val. Deprecated: Use delayed-assoc instead.
(lazy-hash-map & kvs)
lazy-hash-map creates a map. The values are not evaluated before their first retrieval. Each value is evaluated at most once. The underlying map is a hash map.
lazy-hash-map creates a map. The values are not evaluated before their first retrieval. Each value is evaluated at most once. The underlying map is a hash map.
(lazy-hash-map* & kvs)
lazy-hash-map* is the same as lazy-hash-map except that its a function and it takes a seq of keys-delayed-value pairs.
Deprecated: Use delayed-hash-map.
lazy-hash-map* is the same as lazy-hash-map except that its a function and it takes a seq of keys-delayed-value pairs. Deprecated: Use delayed-hash-map.
(lazy-sorted-map & kvs)
lazy-sorted-map creates a map. The values are not evaluated before their first retrieval. Each value is evaluated at most once. The underlying map is a sorted map.
lazy-sorted-map creates a map. The values are not evaluated before their first retrieval. Each value is evaluated at most once. The underlying map is a sorted map.
(lazy-sorted-map* & kvs)
lazy-sorted-map* is the same as lazy-sorted-map except that its a function and it takes a seq of keys-delayed-value pairs.
Deprecated: Use delayed-sorted-map
lazy-sorted-map* is the same as lazy-sorted-map except that its a function and it takes a seq of keys-delayed-value pairs. Deprecated: Use delayed-sorted-map
(lazy-struct s & vs)
lazy-struct creates a map. The values are not evaluated before their first retrieval. Each value is evaluated at most once. The underlying map is a struct map according to the provided structure s. As with Clojure's struct the values have to appear in the order of the keys in the structure.
lazy-struct creates a map. The values are not evaluated before their first retrieval. Each value is evaluated at most once. The underlying map is a struct map according to the provided structure s. As with Clojure's struct the values have to appear in the order of the keys in the structure.
(lazy-struct* s & vs)
lazy-struct* is the same as lazy-struct except that its a function and it takes a seq of delayed value together with the struct basis.
Deprecated: Use delayed-struct
lazy-struct* is the same as lazy-struct except that its a function and it takes a seq of delayed value together with the struct basis. Deprecated: Use delayed-struct
(lazy-struct-map s & kvs)
lazy-struct-map creates a map. The values are not evaluated before their first retrieval. Each value is evaluated at most once. The underlying map is a struct map according to the provided structure s.
lazy-struct-map creates a map. The values are not evaluated before their first retrieval. Each value is evaluated at most once. The underlying map is a struct map according to the provided structure s.
(lazy-struct-map* s & kvs)
lazy-struct-map* is the same as lazy-struct-map except that its a function and it takes a seq of keys-delayed-value pairs together with the struct basis.
Deprecated: Use delayed-struct-map
lazy-struct-map* is the same as lazy-struct-map except that its a function and it takes a seq of keys-delayed-value pairs together with the struct basis. Deprecated: Use delayed-struct-map
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close