Skip to content
This repository
Browse code

Comment on using self cell.

  • Loading branch information...
commit 498bb17862dddbedd5c2063d87310e6bfe7c0e96 1 parent d1e57d1
Victor Hugo Borja authored August 11, 2012

Showing 1 changed file with 5 additions and 2 deletions. Show diff stats Hide diff stats

  1. 7  README.md
7  README.md
Source Rendered
@@ -180,13 +180,16 @@ NOR.b(false) // here we are changing the value of the b cell
180 180
 The `NoR` function form is:
181 181
 
182 182
 ```javascript
183  
-NoR(gate, optional_setup)
  183
+NoR(gate, optional_setup, optional_self)
184 184
 ```
185 185
 
186 186
 Where `gate` is a function that receives *cells* and is invoked
187 187
 whenever one of them changes. An `optional_setup` can be a function
188 188
 that receives the same *cells* than `gate` for the sake of setting up
189  
-cell subscriptions or creating inner gates.
  189
+cell subscriptions or creating inner gates. If a value for
  190
+`optional_self` if given it will be wrapped on an special *cell* named
  191
+`self` and its value will be used as `this` whenever `gate` gets
  192
+called, of course changing the gate's self will trigger its evaluation.
190 193
 
191 194
 For example, to build an `XOR` gate using just the universal `NOR`
192 195
 gate, you can do:

0 notes on commit 498bb17

Please sign in to comment.
Something went wrong with that request. Please try again.