conjunction v1.0.1 Conjunction

Summary

Functions

Combine a list of strings with a conjunction

Functions

join(words, conjunction \\ "and")

Combine a list of strings with a conjunction

Examples

iex> Conjunction.join([])
""

iex> Conjunction.join(["red"])
"red"

iex> Conjunction.join(["red", "blue"])
"red and blue"

iex> Conjunction.join(["red", "blue"], "or")
"red or blue"

iex> Conjunction.join(["red", "blue", "white"])
"red, blue, and white"

iex> Conjunction.join(["red", "blue", "white"], "or")
"red, blue, or white"