       locks.shift()
       true
     false
-
-# Default comparator is good only for strings, use a - b for numbers.
-comparator = (a, b) ->
-  if a < b then -1 else if a > b then 1 else 0
-
-# Default extractor returns the value as hole, i.e. tree of integers.
-extractor = (a) -> a
 
 class LeafIO
   constructor: (@filename) ->

  # value, as long as we let go of it immediately. This allows us to read from
  # leaf pages to get branch values.
  # TODO: Rename this descend.
  mutate: (_) ->
    parent = null


# A Streamline.js friendly evented I/O b-tree for node.js.
#
# ## Purpose
# 
# Implements a file backed b-tree.

# Requried node.js libraries.
fs = require "fs"

# Copy values from one hash into another.
extend = (to, from) ->
  to[key] = value for key, value of from
  to

# Useful for command debugging. If you don't see them called in the code, it
# means the code is absolutely bug free.
die = (splat...) ->
  console.log.apply null, splat if splat.length
  process.exit 1
say = (splat...) -> console.log.apply null, splat

# Default comparator is good only for strings, use a - b for numbers.
comparator = (a, b) ->
  if a < b then -1 else if a > b then 1 else 0

# Default extractor returns the value as hole, i.e. tree of integers.
extractor = (a) -> a

# Glossary:
# 
#  * Descent - What we call an attempt to move from a parent node to a child
#              node in  the tree, which may be paused because it encounters a
#              lock on a tier.

#              
class Mutation
  # The constructor always felt like a dangerous place to be doing anything
  # meaningful in C++ or Java.
  constructor: (@strata, @object, @key, @operation) ->
    @io         = @strata._io
