function Chain(value) {
    if (!(this instanceof Chain)) {
      throw new SyntaxError('Constructor must be called with the new operator');
    }

    if (type.isChain(value)) {
      this.value = value.value;
    } else {
      this.value = value;
    }
  }
@constructor Chain
Wrap any value in a chain, allowing to perform chained operations on
the value.

All methods available in the math.js library can be called upon the chain,
and then will be evaluated with the value itself as first argument.
The chain can be closed by executing chain.done(), which will return
the final value.

The Chain has a number of special functions:
- done()             Finalize the chained operation and return the
                     chain's value.
- valueOf()          The same as done()
- toString()         Returns a string representation of the chain's value.

@param {*} [value]