From 9a149bf85acef70292b97ee6c8f860dcfb385795 Mon Sep 17 00:00:00 2001 From: Magnar Sveen Date: Sat, 17 Aug 2013 00:44:07 +0200 Subject: [PATCH] Add anaphoric example to --max-by and --min-by --- dev/examples.el | 2 ++ 1 file changed, 2 insertions(+) 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)