Doc Project v0.1.0 DocProject View Source
This is the main (and only) module for the doc project, which is intended to demonstrate documentation.
The documentation in this module will be used for generating HTML documentation. It will be formatted real nice and pretty with pleasing colors and links. Yeah, links! Pretty fancy stuff. All it needs now are some unicorns and rainbows, but we ran out.
Link to this section Summary
Link to this section Functions
Link to this function
stringify(enumerable) View Source
Converts an enumerable into string form
The contents of the enumerable will be iterated over, converted to a string
using Kernel.inspect/1
and put in a comma-separated list surrounded by brackets.
Examples
iex> DocProject.stringify([])
"[]"
iex> DocProject.stringify(["a", "b", "c"])
"[\"a\", \"b\", \"c\"]"
iex> DocProject.stringify(1..10)
"[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"
Link to this function
sum(enumerable) View Source
Sums the numbers in an enumerable.
If the enumerable does not contain all numbers, then there will be trouble.
Examples
iex> DocProject.sum([1, 2, 3, 4, 5])
15
iex> DocProject.sum(1..10)
55
iex> DocProject.sum([22])
22
iex> DocProject.sum([])
0