You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Starlark lists module with several functions that make working with list values a little eaiser. I am willing to contribute it to bazel-skylib as the functionality seems generally useful.
Current functions:
compact: Given a list, return a new list having removed the items that equal None.
contains: It has two modes.
Given a list and a bool function (i.e., accepts a single parameter and returns a bool), it will return True if any of the items in the list satisfy the function.
Given a list and any other type, it will return True if any of the items equal the input.
find: Given a list and a bool function, it will return the item that satisfies the function.
flatten: Given a list that may contain items that are list values, it returns a list with all of the items flattened (i.e., no items in the result are an item of type list).
If the code owners are agreeable, I am willing to put up one or more PRs.
The text was updated successfully, but these errors were encountered:
I have a Starlark
lists
module with several functions that make working withlist
values a little eaiser. I am willing to contribute it tobazel-skylib
as the functionality seems generally useful.Current functions:
compact
: Given alist
, return a newlist
having removed the items that equalNone
.contains
: It has two modes.list
and abool
function (i.e., accepts a single parameter and returns abool
), it will returnTrue
if any of the items in the list satisfy the function.list
and any other type, it will returnTrue
if any of the items equal the input.find
: Given a list and abool
function, it will return the item that satisfies the function.flatten
: Given alist
that may contain items that arelist
values, it returns alist
with all of the items flattened (i.e., no items in the result are an item of typelist
).If the code owners are agreeable, I am willing to put up one or more PRs.
The text was updated successfully, but these errors were encountered: