Skip to content

Commit

Permalink
Fix -map-last docs (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamNiederer authored and Fuco1 committed May 23, 2017
1 parent 81ef1ef commit 524e6fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -355,7 +355,7 @@ See also: [`-map-when`](#-map-when-pred-rep-list), [`-replace-first`](#-replace-

#### -map-last `(pred rep list)`

Replace first item in `list` satisfying `pred` with result of `rep` called on this item.
Replace last item in `list` satisfying `pred` with result of `rep` called on this item.

See also: [`-map-when`](#-map-when-pred-rep-list), [`-replace-last`](#-replace-last-old-new-list)

Expand Down
2 changes: 1 addition & 1 deletion dash.el
Expand Up @@ -388,7 +388,7 @@ See also: `-map-when', `-replace-first'"
`(-map-first (lambda (it) ,pred) (lambda (it) (ignore it) ,rep) ,list))

(defun -map-last (pred rep list)
"Replace first item in LIST satisfying PRED with result of REP called on this item.
"Replace last item in LIST satisfying PRED with result of REP called on this item.
See also: `-map-when', `-replace-last'"
(nreverse (-map-first pred rep (reverse list))))
Expand Down

0 comments on commit 524e6fe

Please sign in to comment.