       , (error, results) -> callback err, results
 
   # Returns an instance given its name.
+  # TODO: put err in to config
   @get: (name, callback) ->
     @list (err, list) ->
       k = _.find list, (n) ->

  # bit at the end.
  config = o.name.replace /_\d+$/, ''
  new Linode config, o.id, o.name, o.state

# :todo: move somewhere else
# :todo: (exercise for reader) rewrite with O(n) complexity
# Minimal EXcluded.
# Given a set of numbers (non-negative integers), return the Minimal Excluded
# number, which is the smallest number that is not in the set.
# For example, mex([0,1,5]) == 2
mex = (l) ->
  _.min(i for i in [0..l.length] when i not in l)

_s           = require('underscore.string')
async        = require 'async'

mex           = (require 'utility').mex
LithiumConfig = (require 'lithium_config').LithiumConfig
Instance      = (require 'instance').Instance

