   rowHeightProp = Bacon.constant(25)
   bodyHeightProp = bodyHeightBus.merge(bodyHeightStream)
     .skipDuplicates()
-    .filter (height) -> height > 0
+    .filter R.lt(0)
     .toProperty(100)
 
   scrollTopProp = Bacon.update 0,
-    [scrollTopBus], (..., scrollTop) -> scrollTop
+    [scrollTopBus], R.nthArg(-1)
     [selectedItemProp.changes(), matchedItemsProp, rowHeightProp, bodyHeightProp], adjustScrollTopForSelectedItem
 
   visibleBeginProp = Bacon.combineWith (scrollTop, rowHeight) ->

createElement                  = require 'virtual-dom/create-element'
diff                           = require 'virtual-dom/diff'
patch                          = require 'virtual-dom/patch'
vDOM                           = require './vdom'
Keys                           = require './keys'
selectItemByRelativeOffset     = require './select-item-by-relative-offset'
adjustScrollTopForSelectedItem = require './adjust-scroll-top-for-seleted-item'

  selectNextStream   = keyDownBus.filter(Keys.isKey('down')).doAction(preventDefault)
  moveSelectedStream = selectPrevStream.map(-1).merge(selectNextStream.map(1))

  vDomTree = vDom.rootNode vDom.search(inputBus, keyDownBus)
  elementProp = Bacon.update createElement(vDomTree),
    [focusBus], R.tap (el) ->
      el.querySelector('.search').focus()
    [resetStream], R.tap (el) =>
      el.querySelector('.search').value = ''

  inputValueStream = inputBus.map('.target.value')
  searchStream = inputValueStream.merge resetStream.map('')
  searchBus.plug(searchStream)

  selectedItemProp = Bacon.update(undefined,
    [searchStream], R.always(undefined)
    [selectItemBus], R.nthArg(-1)
    [moveSelectedStream, matchedItemsProp], selectItemByRelativeOffset
  ).skipDuplicates()

