title: Either type implementation in JavaScript
body: <p>In all the libraries implementing <code>Either</code> in JavaScript, I notice that <code>Either.of</code> returns a <code>Right</code>, I feel that I'm missing something about why that is, does anyone know? Also my intuition for an <code>Either</code> implementation is something like <code>new Either(true, 'foo')</code> for a <code>right</code> and <code>new Either(false, 'err')</code> for a <code>left</code> and maybe have static methods like <code>Either.right</code> and <code>Either.left</code> but all the libraries seem to have a base class <code>Either</code> and sub classes <code>Left</code> and <code>Right</code>, I also feel that I'm missing something about why most of them decided to implement it with inheritance?</p>