Skip to main content

Creating

20
  • array-map

    Constructs an array-map. If any keys are equal, they are handled as if by repeated uses of assoc.

  • cycle

    Returns a lazy (infinite!) sequence of repetitions of the items in coll.

  • hash-map

    keyval => key val Returns a new hash map with supplied mappings. If any keys are equal, they are handled as if by r...

  • hash-set

    Returns a new hash set with supplied keys. Any equal keys are handled as if by repeated uses of conj.

  • iterate

    Returns a lazy (infinite!) sequence of x, (f x), (f (f x)) etc. f must be free of side-effects

  • lazy-seq

    Takes a body of expressions that returns an ISeq or nil, and yields a Seqable object that will invoke the body only th...

  • list

    Creates a new list containing the items.

  • list*

    Creates a new seq containing the items prepended to the rest, the last of which will be treated as a sequence.

  • range

    Returns a lazy seq of nums from start (inclusive) to end (exclusive), by step, where start defaults to 0, step to 1, a...

  • repeat

    Returns a lazy (infinite!, or length n if supplied) sequence of xs.

  • repeatedly

    Takes a function of no args, presumably with side effects, and returns an infinite (or length n if supplied) lazy sequ...

  • set

    Returns a set of the distinct elements of coll.

  • sorted-map

    keyval => key val Returns a new sorted map with supplied mappings. If any keys are equal, they are handled as if by...

  • sorted-map-by

    keyval => key val Returns a new sorted map with supplied mappings, using the supplied comparator. If any keys are e...

  • sorted-set

    Returns a new sorted set with supplied keys. Any equal keys are handled as if by repeated uses of conj.

  • sorted-set-by

    Returns a new sorted set with supplied keys, using the supplied comparator. Any equal keys are handled as if by repea...

  • vec

    Creates a new vector containing the contents of coll. Java arrays will be aliased and should not be modified.

  • vector

    Creates a new vector containing the args.

  • vector-of

    Creates a new vector of a single primitive type t, where t is one of :int :long :float :double :byte :short :char or :...

  • zipmap

    Returns a map with the keys mapped to the corresponding vals.