Cleanup and reduced repetition in README
This commit is contained in:
parent
df83b69ede
commit
1ee494ebae
|
@ -90,15 +90,14 @@ write:
|
|||
|
||||
Calling it is as simple as `(sq 5)`, which returns `25`.
|
||||
|
||||
Lambdas can also be applied anonymously, as in `((fn (a) (* a a)) 5)`, which also returns `25`.
|
||||
This is most useful when using something like `map`. For example, an anonymous lambda could be used to square each
|
||||
Lambdas can also be applied anonymously. This is most useful when using something like `map`. For example, an anonymous lambda could be used to square each
|
||||
element in a list:
|
||||
|
||||
```
|
||||
(map (fn (a) (* a a)) (1 2 3 5 8 13 21 34))
|
||||
```
|
||||
|
||||
This is particularly useful on a low-memory device like the Pebble, where it may be useful to avoid storing the named
|
||||
This is particularly valuable on a low-memory device like the Pebble, where it may be wise to avoid storing the named
|
||||
lambda object in the environment.
|
||||
|
||||
Lambdas may also have no arguments:
|
||||
|
|
Loading…
Reference in New Issue