Merge pull request #129 from holomorph/docs

docs
master
Matus Goljer 11 years ago
commit ffa37bf5b9
  1. 50
      README.md
  2. 6
      dash-template.texi
  3. 6
      dash.texi
  4. 6
      readme-template.md

@ -34,6 +34,31 @@ Include this in your emacs settings to get syntax highlighting:
## Functions ## Functions
All functions and constructs in the library are prefixed with a dash (-).
There are also anaphoric versions of functions where that makes sense,
prefixed with two dashes instead of one.
While `-map` takes a function to map over the list, you can also use
the anaphoric form with double dashes - which will then be executed
with `it` exposed as the list item. Here's an example:
```el
(-map (lambda (n) (* n n)) '(1 2 3 4)) ;; normal version
(--map (* it it) '(1 2 3 4)) ;; anaphoric version
```
of course the original can also be written like
```el
(defun square (n) (* n n))
(-map 'square '(1 2 3 4))
```
which demonstrates the usefulness of both versions.
### Maps ### Maps
@ -264,31 +289,6 @@ These combinators require Emacs 24 for its lexical scope. So they are offered in
* [-fixfn](#-fixfn-fn-optional-equal-test-halt-test) `(fn &optional equal-test halt-test)` * [-fixfn](#-fixfn-fn-optional-equal-test-halt-test) `(fn &optional equal-test halt-test)`
* [-prodfn](#-prodfn-rest-fns) `(&rest fns)` * [-prodfn](#-prodfn-rest-fns) `(&rest fns)`
## Anaphoric functions
There are also anaphoric versions of functions where that makes sense,
prefixed with two dashes instead of one.
While `-map` takes a function to map over the list, you can also use
the anaphoric form with double dashes - which will then be executed
with `it` exposed as the list item. Here's an example:
```el
(-map (lambda (n) (* n n)) '(1 2 3 4)) ;; normal version
(--map (* it it) '(1 2 3 4)) ;; anaphoric version
```
of course the original can also be written like
```el
(defun square (n) (* n n))
(-map 'square '(1 2 3 4))
```
which demonstrates the usefulness of both versions.
## Maps ## Maps

@ -433,6 +433,12 @@ script for generating documentation.
@item @item
@uref{https://github.com/holomorph,Mark Oteiza} contributed the @uref{https://github.com/holomorph,Mark Oteiza} contributed the
script to create an info manual. script to create an info manual.
@item
@uref{https://github.com/wasamasa,Vasilij Schneidermann} contributed
@code{-some}.
@item
@uref{https://github.com/occidens,William West} made @code{-fixfn}
more robust at handling floats.
@end itemize @end itemize
Thanks! Thanks!

@ -3784,6 +3784,12 @@ script for generating documentation.
@item @item
@uref{https://github.com/holomorph,Mark Oteiza} contributed the @uref{https://github.com/holomorph,Mark Oteiza} contributed the
script to create an info manual. script to create an info manual.
@item
@uref{https://github.com/wasamasa,Vasilij Schneidermann} contributed
@code{-some}.
@item
@uref{https://github.com/occidens,William West} made @code{-fixfn}
more robust at handling floats.
@end itemize @end itemize
Thanks! Thanks!

@ -34,9 +34,7 @@ Include this in your emacs settings to get syntax highlighting:
## Functions ## Functions
[[ function-list ]] All functions and constructs in the library are prefixed with a dash (-).
## Anaphoric functions
There are also anaphoric versions of functions where that makes sense, There are also anaphoric versions of functions where that makes sense,
prefixed with two dashes instead of one. prefixed with two dashes instead of one.
@ -61,6 +59,8 @@ of course the original can also be written like
which demonstrates the usefulness of both versions. which demonstrates the usefulness of both versions.
[[ function-list ]]
[[ function-docs ]] [[ function-docs ]]
## Contribute ## Contribute

Loading…
Cancel
Save