Skip to content

Commit

Permalink
Merge pull request #264 from ddeaguiar/gh-pages
Browse files Browse the repository at this point in the history
Corrected bug in second 'Context' example.
  • Loading branch information
ordnungswidrig authored Jul 8, 2016
2 parents 21f6cd8 + a0273ae commit 38c7ca3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/execution-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ value of the function is used as the new context value:

{% highlight clojure %}
(defresource foo
:service-available? {:a [1]}
:exists? (fn [ctx] #(assoc ctx :a [2]))
:service-available? {:entity [1]}
:exists? (fn [ctx] #(assoc ctx :entity [2]))
:handle-ok :entity)
{% endhighlight %}

Without the wrapping in a function the updated context after
```exists?``` would be ````{:a [1 2]}```` whereas in this case we get
````{:a [1]}````.
```exists?``` would be ````{:entity [1 2]}```` whereas in this case we get
````{:entity [2]}````.

## Decision functions

Expand Down

0 comments on commit 38c7ca3

Please sign in to comment.