Skip to content

Commit

Permalink
Passes black
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Quesada committed Sep 21, 2023
1 parent b3dd508 commit 5e621aa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion thewalrus/reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,12 @@ def rpmp(s):
generator: the set of restricted perfect matching permutations of the tuple s
"""
m = len(s) // 2
local_mapper = lambda x: mapper(x, s)
def local_mapper(x):
"""Helper function to define a local mapper based on the symbols s
Args:
x (iterable): object to be mapped
"""
return mapper(x, s)
for i in product(permutations(range(1, m)), bitstrings(m)):
yield local_mapper(i)

Expand Down

0 comments on commit 5e621aa

Please sign in to comment.