Learning Elixir: Private vs Public Functions

New article: Elixir Public vs Private Functions

I’ve published the next article in my Elixir learning series on dev.to, exploring private vs public functions — what defp actually protects, and how a small public surface keeps a module easy to change.

What it covers

  • def vs defp, and how the compiler enforces that boundary
  • Refactoring our todo modules: turning inline steps into private helpers and simplifying return shapes
  • @doc on private functions vs @doc false — and reading a module’s surface with __info__
  • Patterns that show up constantly: public wrapper / private engine, private edge cases, and a recursive worker

It keeps building on the same learning_elixir Mix project — every example is a real file you can copy and run with mix run.

:backhand_index_pointing_right: Check it out: