emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/dash 9a149bf 219/439: Add anaphoric example to --max-by


From: Phillip Lord
Subject: [elpa] externals/dash 9a149bf 219/439: Add anaphoric example to --max-by and --min-by
Date: Tue, 04 Aug 2015 20:28:12 +0000

branch: externals/dash
commit 9a149bf85acef70292b97ee6c8f860dcfb385795
Author: Magnar Sveen <address@hidden>
Commit: Magnar Sveen <address@hidden>

    Add anaphoric example to --max-by and --min-by
---
 dev/examples.el |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dev/examples.el b/dev/examples.el
index 8c750eb..55aaa8a 100644
--- a/dev/examples.el
+++ b/dev/examples.el
@@ -117,6 +117,7 @@
 (defexamples -min-by
   (-min-by '> '(4 3 6 1)) => 1
   (-min-by (-on '> 'length) '((1 2 3) (1) (1 2))) => '(1)
+  (--min-by (> (length it) (length other)) '((1 2 3) (1) (1 2))) => '(1)
   (-min-by (-on 'string-lessp 'int-to-string) '(2 100 22)) => 22
   (-min-by '< '(4 3 6 1)) => 6)
 
@@ -128,6 +129,7 @@
 (defexamples -max-by
   (-max-by '> '(4 3 6 1)) => 6
   (-max-by (-on '> 'car) '((2 2 3) (3) (1 2))) => '(3)
+  (--max-by (> (car it) (car other)) '((2 2 3) (3) (1 2))) => '(3)
   (-max-by (-on '> 'string-to-int) '("1" "2" "3")) => "3"
   (-max-by '< '(4 3 6 1)) => 1)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]