Skip to content

Instantly share code, notes, and snippets.

@c-spencer
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save c-spencer/7c020d2d026fee856cc0 to your computer and use it in GitHub Desktop.
Save c-spencer/7c020d2d026fee856cc0 to your computer and use it in GitHub Desktop.
# current
("You came in " <> case(plural("en", :ordinal, args[:place])) do
"few" ->
to_string(args[:place]) <> "rd"
"one" ->
to_string(args[:place]) <> "st"
"other" ->
to_string(args[:place]) <> "th"
"two" ->
to_string(args[:place]) <> "nd"
end) <> " place."
# iolist?
["You came in ", case(plural("en", :ordinal, args[:place])) do
"few" ->
[to_string(args[:place]), "rd"]
"one" ->
[to_string(args[:place]), "st"]
"other" ->
[to_string(args[:place]), "th"]
"two" ->
[to_string(args[:place]), "nd"]
end), " place."]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment