<commit_before>optional-monad
==============

A minimal C++ library providing a few functions to be able to work with
boost/std::optional as a monad.

fmap:

```c++
auto fmap(const optional<T>& opt, Func&& func) -> optional<decltype(func(*opt))>;
```

bind:

```c++
auto bind(const optional<T>& opt, Func&& func) -> decltype(func(*opt));
```

with:

```c++
void with(optional<T>& opt, const Func& func);
```

<NAME> <<EMAIL>>

Last update: 05 March 2017<commit_msg>Add TODO section to README<commit_after>optional-monad
==============

A minimal C++ library providing a few functions to be able to work with
boost/std::optional as a monad.

fmap:

```c++
auto fmap(const optional<T>& opt, Func&& func) -> optional<decltype(func(*opt))>;
```

bind:

```c++
auto bind(const optional<T>& opt, Func&& func) -> decltype(func(*opt));
```

with:

```c++
void with(optional<T>& opt, const Func& func);
```

TODO
----

- Wrap in a suitable namespace (what name? `optm`, `optmonad`, `omonad`,
  `omon`, `opt_monad`, `optional_monad`?)
- Convert test to actual unit tests (let's try Catch).
- Hook up unit tests to CI system (Travis-CI?)
- Proper cross-platform build system (probably CMake).
- Currently hardcoded for `boost::optional`. Make it work with `std::optional`
  out-of-the-box.

<NAME> <<EMAIL>>

Last update: 05 March 2017
{'fraction_non_alphanumeric': 0.19259818731117825, 'fraction_numerical': 0.00906344410876133, 'mean_word_length': 4.915178571428571, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1807734', 'n_tokens_mistral': 482, 'n_tokens_neox': 452, 'n_words': 154}