-
Notifications
You must be signed in to change notification settings - Fork 270
Open
Description
This is similar to itertools.starmap but without the map part. It would allow the following:
pipe(
data,
unpack(f), # ---> call f(*args) instead of f(args)
list
)Currently you need to do it via lambda:
data = ((1, 2, 3, 4), ('a', 'b', 'c', 'd'), ('🤔', '🙈', '😌', '💕'))
pipe(
data,
lambda x: zip(*x),
list
)
# [(1, 'a', '🤔'), (2, 'b', '🙈'), (3, 'c', '😌'), (4, 'd', '💕')]
Also requested in funcy and StackOverflow
Metadata
Metadata
Assignees
Labels
No labels