X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=README.md;h=e5578b493a27d3db2b2391fe8a906915f9711b33;hb=d2ab44d26101887316d7537c37eb27533985184f;hp=831c50e4c63829c83b9ee9fc46343cf983829ddb;hpb=d45d190d075db739dfc353ff3f29ba788130c2fc;p=hope.git diff --git a/README.md b/README.md index 831c50e..e5578b4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,36 @@ [![Build Status](https://travis-ci.org/ibnfirnas/hope.svg?branch=master)](https://travis-ci.org/ibnfirnas/hope) -HOPE: Higher Order Programming in Erlang -======================================== +Higher Order Programming in Erlang +================================== + +A quest for a "standard" library with uniform, composable abstractions. + + +Monads +------ + +Defined in `hope_gen_monad`, implemented as: + +- `hope_result`: for composition of common functions returning + `{ok, Val} | {error, Reason}`. An alternative to exceptions, which makes the + error conditions apparent in the spec/signature. Analogous to Haskell's + `Data.Either a b`, Jane Street Core's (OCaml) `('a, 'b) Result.t`, Rust's + `Result` +- `hope_option`: for expressing and composing the intention that the value may + or may not be available. An alternative to the common `undefined` (which is + equivalent to the dreaded `null`). Analogous to ML's (SML, OCaml, etc) + `'a Option.t`, Rust's `Option` and Haskell's `Data.Maybe a` [1]. + + +Containers +---------- + +### Dictionary + +Defined in `hope_gen_dictionary`, implemented as: + +- `hope_kv_list`. Equivalent to orddict/proplist. Operations implemented with + BIFs from `lists` module, where possible + + +[1]: http://en.wikipedia.org/wiki/Option_type