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

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

[elpa] externals/dash 86de963 217/439: Add docs about require for dash-f


From: Phillip Lord
Subject: [elpa] externals/dash 86de963 217/439: Add docs about require for dash-functional
Date: Tue, 04 Aug 2015 20:28:10 +0000

branch: externals/dash
commit 86de963a80569b907264d4b077437d28f2fadc2a
Author: Magnar Sveen <address@hidden>
Commit: Magnar Sveen <address@hidden>

    Add docs about require for dash-functional
---
 README.md          |   14 ++++++++++++++
 dash-functional.el |   28 +++++++++++++++++++++-------
 2 files changed, 35 insertions(+), 7 deletions(-)

diff --git a/README.md b/README.md
index d24bf99..6261ac6 100644
--- a/README.md
+++ b/README.md
@@ -935,6 +935,8 @@ results (in the same order).
 
 In types: (b -> b -> c) -> (a -> b) -> a -> a -> c
 
+Available by `(require 'dash-functional)`. Requires Emacs 24 or higher.
+
 ```cl
 (-sort (-on '< 'length) '((1 2 3) (1) (1 2))) ;; => '((1) (1 2) (1 2 3))
 (-sort (-on 'string-lessp 'int-to-string) '(10 12 1 2 22)) ;; => '(1 10 12 2 
22)
@@ -947,6 +949,8 @@ Swap the order of arguments for binary function `func`.
 
 In types: (a -> b -> c) -> b -> a -> c
 
+Available by `(require 'dash-functional)`. Requires Emacs 24 or higher.
+
 ```cl
 (funcall (-flip '<) 2 1) ;; => t
 (funcall (-flip '-) 3 8) ;; => 5
@@ -959,6 +963,8 @@ Return a function that returns `c` ignoring any additional 
arguments.
 
 In types: a -> b -> a
 
+Available by `(require 'dash-functional)`. Requires Emacs 24 or higher.
+
 ```cl
 (funcall (-const 2) 1 3 "foo") ;; => 2
 (-map (-const 1) '("a" "b" "c" "d")) ;; => '(1 1 1 1)
@@ -972,6 +978,8 @@ Arguments denoted by <> will be left unspecialized.
 
 See `srfi-26` for detailed description.
 
+Available by `(require 'dash-functional)`. Requires Emacs 24 or higher.
+
 ```cl
 (funcall (-cut list 1 <> 3 <> 5) 2 4) ;; => '(1 2 3 4 5)
 (-map (-cut funcall <> 5) '(1+ 1- (lambda (x) (/ 1.0 x)))) ;; => '(6 4 0.2)
@@ -984,6 +992,8 @@ Take an unary predicates `pred` and return an unary 
predicate
 that returns t if `pred` returns nil and nil if `pred` returns
 non-nil.
 
+Available by `(require 'dash-functional)`. Requires Emacs 24 or higher.
+
 ```cl
 (funcall (-not 'even?) 5) ;; => t
 (-filter (-not (-partial '< 4)) '(1 2 3 4 5 6 7 8)) ;; => '(1 2 3 4)
@@ -997,6 +1007,8 @@ the `preds` returns non-nil on x.
 
 In types: [a -> Bool] -> a -> Bool
 
+Available by `(require 'dash-functional)`. Requires Emacs 24 or higher.
+
 ```cl
 (-filter (-orfn 'even? (-partial (-flip '<) 5)) '(1 2 3 4 5 6 7 8 9 10)) ;; => 
'(1 2 3 4 6 8 10)
 (funcall (-orfn 'stringp 'even?) "foo") ;; => t
@@ -1010,6 +1022,8 @@ predicate with argument x that returns non-nil if all of 
the
 
 In types: [a -> Bool] -> a -> Bool
 
+Available by `(require 'dash-functional)`. Requires Emacs 24 or higher.
+
 ```cl
 (funcall (-andfn (-cut < <> 10) 'even?) 6) ;; => t
 (funcall (-andfn (-cut < <> 10) 'even?) 12) ;; => nil
diff --git a/dash-functional.el b/dash-functional.el
index 0770d72..d7e70bf 100644
--- a/dash-functional.el
+++ b/dash-functional.el
@@ -64,26 +64,34 @@ expects a list with n items as arguments"
 TRANSFORMER to each of them and then applies OPERATOR on the
 results (in the same order).
 
-In types: (b -> b -> c) -> (a -> b) -> a -> a -> c"
+In types: (b -> b -> c) -> (a -> b) -> a -> a -> c
+
+Available by `(require 'dash-functional)`. Requires Emacs 24 or higher."
   (lambda (x y) (funcall operator (funcall transformer x) (funcall transformer 
y))))
 
 (defun -flip (func)
   "Swap the order of arguments for binary function FUNC.
 
-In types: (a -> b -> c) -> b -> a -> c"
+In types: (a -> b -> c) -> b -> a -> c
+
+Available by `(require 'dash-functional)`. Requires Emacs 24 or higher."
   (lambda (x y) (funcall func y x)))
 
 (defun -const (c)
   "Return a function that returns C ignoring any additional arguments.
 
-In types: a -> b -> a"
+In types: a -> b -> a
+
+Available by `(require 'dash-functional)`. Requires Emacs 24 or higher."
   (lambda (&rest args) c))
 
 (defmacro -cut (&rest params)
   "Take n-ary function and n arguments and specialize some of them.
 Arguments denoted by <> will be left unspecialized.
 
-See SRFI-26 for detailed description."
+See SRFI-26 for detailed description.
+
+Available by `(require 'dash-functional)`. Requires Emacs 24 or higher."
   (let* ((i 0)
          (args (mapcar (lambda (x) (setq i (1+ i)) (make-symbol (format "D%d" 
i)))
                        (-filter (-partial 'eq '<>) params))))
@@ -93,7 +101,9 @@ See SRFI-26 for detailed description."
 (defun -not (pred)
   "Take an unary predicates PRED and return an unary predicate
 that returns t if PRED returns nil and nil if PRED returns
-non-nil."
+non-nil.
+
+Available by `(require 'dash-functional)`. Requires Emacs 24 or higher."
   (lambda (x) (not (funcall pred x))))
 
 (defun -orfn (&rest preds)
@@ -101,7 +111,9 @@ non-nil."
 predicate with argument x that returns non-nil if at least one of
 the PREDS returns non-nil on x.
 
-In types: [a -> Bool] -> a -> Bool"
+In types: [a -> Bool] -> a -> Bool
+
+Available by `(require 'dash-functional)`. Requires Emacs 24 or higher."
   (lambda (x) (-any? (-cut funcall <> x) preds)))
 
 (defun -andfn (&rest preds)
@@ -109,7 +121,9 @@ In types: [a -> Bool] -> a -> Bool"
 predicate with argument x that returns non-nil if all of the
 PREDS returns non-nil on x.
 
-In types: [a -> Bool] -> a -> Bool"
+In types: [a -> Bool] -> a -> Bool
+
+Available by `(require 'dash-functional)`. Requires Emacs 24 or higher."
   (lambda (x) (-all? (-cut funcall <> x) preds)))
 
 (provide 'dash-functional)



reply via email to

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