 describe "A basic funnel", ->
 
+  count = 0
   funnel = {}
   rules =
     # in this case only one rule depends on our `input` - a reserved rule
     word: (input) ->
       # notice how we are returning multiple times in the same function
       @return word for word in input.split(' ')
+
+    # keep track of how many words have been passed into this funnel
+    $word_count: (self, word) ->
+      @return if self then self + 1 else 1
+
+    # keep track of how many times each word has been passed in to this funnel
+    $word_frequency: (self, $word) ->
+      @return if self then self + 1 else 1
 
     # `char` depends on `word`, returning charicters
     char: (word) ->

      funnel.input(inputString)
      
      expect(count).toEqual 45

    # `word_has_vowel` depends on `input` and `word_has_vowel`
    # it is keyed on `input`
    not_english: (self, $input, word_has_vowel) ->
      self ?= true
      @return self && word_has_vowel

  beforeEach ->
    # Create our funnel
    funnel = new Funnel(rules)
    count = 0
  
  describe "the basic dependency structure", ->

    it "calls a rule each time a new set of dependencies is satisfied", ->

      inputString = "The quick brown fox jumps over the lazy dog"

