collections
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
Required.
The value to insert after each item in iterable
.
iterable
Required.
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
Required.
The value to insert before each item in iterable
.
iterable
Required.
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
Required.
An iterable to filter.