Merge pull request #1190 from pyx/docstring
Improve integer? and juxt docstrings
This commit is contained in:
commit
bc4d67891d
1
AUTHORS
1
AUTHORS
@ -73,3 +73,4 @@
|
||||
* Kodi Arfer <git@arfer.net>
|
||||
* Karan Sharma <karansharma1295@gmail.com>
|
||||
* Sergey Sobko <s.sobko@profitware.ru>
|
||||
* Philip Xu <pyx@xrefactor.com>
|
||||
|
@ -266,7 +266,7 @@
|
||||
(long-type x))
|
||||
|
||||
(defn integer? [x]
|
||||
"Return True if x in an integer"
|
||||
"Return True if x is an integer"
|
||||
(isinstance x (, int long-type)))
|
||||
|
||||
(defn integer-char? [x]
|
||||
@ -299,8 +299,8 @@
|
||||
(isinstance x collections.Iterator))
|
||||
|
||||
(defn juxt [f &rest fs]
|
||||
"Return a function that apply a set of functions to same arguments and
|
||||
collect the result into a list."
|
||||
"Return a function that applies each of the supplied functions to a single
|
||||
set of arguments and collects the results into a list."
|
||||
(setv fs (cons f fs))
|
||||
(fn [&rest args &kwargs kwargs]
|
||||
(list-comp (apply f args kwargs) [f fs])))
|
||||
|
Loading…
Reference in New Issue
Block a user