Minimal typos

This commit is contained in:
Henrik Mohr 2016-09-07 15:16:57 +02:00 committed by GitHub
parent 1475a2ef1b
commit e2bd2ca83b

View File

@ -89,8 +89,7 @@ concept, right there.
### Show Me ### Show Me
At the time when you register an event handler, you can provide an At the time when you register an event handler, you can provide a chain of interceptors too.
chain of interceptors too.
Using a 3-arity registration function: Using a 3-arity registration function:
```clj ```clj
@ -108,7 +107,7 @@ Using a 3-arity registration function:
You might see that registration above as associating `:some-id` with two things: (1) a chain of 2 interceptors `[in1 in2]` You might see that registration above as associating `:some-id` with two things: (1) a chain of 2 interceptors `[in1 in2]`
and (2) a handler. and (2) a handler.
Except, the handler is turned into an interceptor too. (We'll see how shortly) Except, the handler is turned into an interceptor too (we'll see how shortly).
So `:some-id` is only associated with one thing: a 3-chain of interceptors, So `:some-id` is only associated with one thing: a 3-chain of interceptors,
with the handler wrapped in an interceptor, called say `h`, and put on the end of the other two: `[in1 in2 h]`. with the handler wrapped in an interceptor, called say `h`, and put on the end of the other two: `[in1 in2 h]`.
@ -136,8 +135,7 @@ Each interceptor has this form:
:after (fn [context] ...)} ;; `identity` would be a noop :after (fn [context] ...)} ;; `identity` would be a noop
``` ```
That's essentially a map of two functions. Now imagine a vector of these maps - that's an That's essentially a map of two functions. Now imagine a vector of these maps - that's an interceptor chain.
an interceptor chain.
Above we imagined an interceptor chain of `[std1 std2 in1 in2 h]`. Now we know that this is really Above we imagined an interceptor chain of `[std1 std2 in1 in2 h]`. Now we know that this is really
a vector of 5 maps: `[{...} {...} {...} {...} {...}]` where each of the 5 maps have a vector of 5 maps: `[{...} {...} {...} {...} {...}]` where each of the 5 maps have
@ -341,7 +339,7 @@ __1.__ When you register an event handler, you can supply a collection of interc
``` ```
__2.__ When you are registering an event handler, you are associating an event id with a chain of interceptors including: __2.__ When you are registering an event handler, you are associating an event id with a chain of interceptors including:
- the ones your supply (optional) - the ones you supply (optional)
- an extra one on the end, which wraps the handler itself - an extra one on the end, which wraps the handler itself
- a couple at the beginning of the chain, put there by the `reg-event-db` or `reg-event-fx`. - a couple at the beginning of the chain, put there by the `reg-event-db` or `reg-event-fx`.