charred.coerce

Coercions to specific java types.

->bi-consumer

(->bi-consumer item)

Coerce an item to a java consumer

->bi-function

(->bi-function item)

Coerce an item to a java bi-function

->consumer

(->consumer item)

Coerce an item to a java consumer

->function

(->function item)

Coerce an item to a java function

->iterator

(->iterator item)

Convert a stream or an iterable into an iterator.

->predicate

(->predicate item)

->supplier

(->supplier item)

Coerce an item or sequence to a java supplier

ary-iter

(ary-iter ary-data)

Create an iterator for any primitive or object java array.

doiter

macro

(doiter varname iterable & body)

Execute body for every item in the iterable. Expecting side effects, returns nil.

indexed-doiter

macro

(indexed-doiter idxvarname varname iterable & body)

Execute body for every item in the iterable. Expecting side effects, returns nil.

map-iter

(map-iter map-fn obj)

Map a function across an object that is convertible to an iterator.

reduce-supplier

(reduce-supplier rfn supp)(reduce-supplier rfn init supp)

Reduce a supplier as if the supplier were a sequence and clojure.core.reduce was called.

supplier->seq

(supplier->seq item)

Conversion from something convertible to a java.util.function.Supplier to a lazy sequence. Has effect of un-chunking lazy sequences.