Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Elixir world makes this easy:

We advise developers to include examples in their documentation, often under their own ## Examples heading. To ensure examples do not get out of date, Elixir's test framework (ExUnit) provides a feature called doctests that allows developers to test the examples in their documentation.

Doctests work by parsing out code samples starting with iex> from the documentation. You can read more about them at ExUnit.DocTest.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: