mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-07-04 08:31:35 +02:00
Comments, small bugfixes removed legacy elements
This commit is contained in:
@ -249,4 +249,11 @@ def get_first(iterable: Iterable, filter_by: Callable[[any], bool] = lambda _: T
|
||||
|
||||
|
||||
def get_first_index(iterable: Iterable, filter_by: Callable[[any], bool] = lambda _: True):
|
||||
"""
|
||||
todo
|
||||
|
||||
:param iterable:
|
||||
:param filter_by:
|
||||
:return:
|
||||
"""
|
||||
return next((idx for idx, x in enumerate(iterable) if filter_by(x)), None)
|
||||
|
Reference in New Issue
Block a user