Fox.EnumExt

Source

Summary

oxford_join(enum, penultimate_joiner \\ ", ", joiner \\ " and ")

Joins the enum with penultimate_joiner until the very end, where the joiner is used

Functions

oxford_join(enum, penultimate_joiner \\ ", ", joiner \\ " and ")

Specs:

Joins the enum with penultimate_joiner until the very end, where the joiner is used.

penultimate_joiner defaults to “, “

joiner defaults to “ and “

Examples

iex> EnumExt.exford_join(["shoes", "ships", "sealing-wax"])
"shoes, ships, and sealing-wax"
Source