Skylib module containing functions that operate on collections.

Macros and Functions

collections.after_each

Inserts separator after each item in iterable.

Example usage (generated)

load("@bazel_skylib//lib:collections.bzl", "collections")

collections.after_each(
    # The value to insert after each item in `iterable`.
    separator = None,
    # The list into which to intersperse the separator.
    iterable = None,
)

separator

The value to insert after each item in iterable.

iterable

The list into which to intersperse the separator.


collections.before_each

Inserts separator before each item in iterable.

Example usage (generated)

load("@bazel_skylib//lib:collections.bzl", "collections")

collections.before_each(
    # The value to insert before each item in `iterable`.
    separator = None,
    # The list into which to intersperse the separator.
    iterable = None,
)

separator

The value to insert before each item in iterable.

iterable

The list into which to intersperse the separator.


collections.uniq

Returns a list of unique elements in iterable.

Requires all the elements to be hashable.

Example usage (generated)

load("@bazel_skylib//lib:collections.bzl", "collections")

collections.uniq(
    # An iterable to filter.
    iterable = None,
)

iterable

An iterable to filter.