jdantonio / functional-ruby

A gem for adding functional programming tools to Ruby. Inspired by Erlang, Clojure, Haskell, and Functional Java.

Home Page:http://www.functional-ruby.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docs for Either seem backwards

mmueller opened this issue · comments

Unless I'm mistaken, the example for Either shows "left" holding a successful result and "right" holding an error value, which is the opposite of how they're described in the docs.

Looking at the code, the #left method has #reason as an alias, indicating failure. The #right method has #value as an alias, indicating success. So it appears that the example is wrong. I'll fix it.