Skip to content
This repository has been archived by the owner on Sep 4, 2023. It is now read-only.

Commit

Permalink
Merge 17cf3c0 into 85ab1c2
Browse files Browse the repository at this point in the history
  • Loading branch information
slavaGanzin committed Jun 10, 2018
2 parents 85ab1c2 + 17cf3c0 commit 16fc1d0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ find :: Predicate a -> Reduction a
map :: (a -> b) -> [a] -> [b]
reduce :: (a -> b -> b) -> a -> [b] -> a
take :: Number -> [a] -> [a]
pluck :: k -> [a] -> [b]
```

Logic
Expand Down
1 change: 1 addition & 0 deletions pyramda/iterable/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
from .for_each import for_each
from .flatten import flatten
from .reject import reject
from .pluck import pluck
6 changes: 6 additions & 0 deletions pyramda/iterable/pluck.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from pyramda.function.curry import curry


@curry
def pluck(key, xs):
return list(map(lambda x: x[key], xs))

0 comments on commit 16fc1d0

Please sign in to comment.