Writing Docs¶
Tips and templates for writing @most/core
docs.
Combinator template¶
Note
Template for writing docs for an API function.
- Copy and paste into appropriate enclosing doc (probably api.rst)
- Complete each todo
- Make sure all todos have been removed before pushing
Todo
Anchor link: function name with leading underscore
Todo
Function name heading
name¶
Todo
Type signature
name :: (a -> b) -> Stream a -> Stream b
Todo
Short description
Short description of what it does. Usually just 1-3 sentences, but may be multiple paragraphs if needed.:
.. todo:: Ascii diagram. For example:
stream: -a-b-c-d-> map(f, stream): -f(a)-f(b)-f(c)-f(d)->
Todo
Optionally add a longer explanation, or delete if not necessary.
Add more explanation only if necessary. Otherwise, just delete this.
Todo
Simple Javascript usage example
map(x => x + 1, stream)