A practice environment for learning functional programming in Elixir with your LLM as a tutor. It complements the Advanced Functional Programming with Elixir book and the Funx library by providing hands-on code that feels like a real project—non-trivial, imperfect, and full of design choices and oversights to explore and improve.
- Advanced Functional Programming with Elixir — a book that provides the structured learning path and theory.
- Interactive Livebooks — notebooks for every chapter, runnable in your browser or with Docker.
- Funx library — universal functional patterns in Elixir, with usage rules for LLMs.
- Learn Funx — a practice environment for using your LLM as a tutor.
- Discord — community space to discuss Advanced Functional Programming with Elixir (the book), the Funx library, and Learn Funx.
git clone https://github.com/JKWA/learn_funx
cd learn_funx
mix deps.getThen launch your LLM (Claude, ChatGPT, or another assistant) and tell it to look for the usage-rules in this project and in Funx.
LLMs (ChatGPT, Claude, etc.) are powerful learning partners, but they need guidance.
Start with context:
Tell your LLM something like:
“There are usage rules for this project and the Funx library. Follow those functional patterns.”
Use an iterative approach:
- Talk first – Discuss the idea before coding
- Small experiments – “Let’s try just this one rule”
- Course correction – Steer when they drift toward imperative logic
- Pattern recognition – Let them discover and reinforce good structure
- Scale up – Only expand once the pattern is solid
This keeps things focused and prevents over-engineering.
Example conversation flow:
- “How should we handle validation with Either?”
- “Show just one rule, in isolation”
- “Good, but remember the usage rules about avoiding case statements”
- “Now apply the same pattern across the others”
Keep them on track:
- Reintroduce usage rules as sessions grow longer
- Watch for imperative habits creeping in
- Ask for small, targeted changes instead of large rewrites
This project contains non-trivial code written in a functional style. It isn’t a polished demo. Like any real codebase, it’s full of design choices and oversights that you can explore and learn from with the help of an LLM.
1. Explore by hand
- Walk through
example.txtin the root directory and paste commands into IEx
2. Use questions to guide learning
- See
questions.mdin the root for learning goals and prompts - Use them with LLMs or for self-assessment
3. Modify and extend
- Add new entities, rules, or capabilities
- Ask where the patterns hold and where they get in the way
Contributions are welcome! This is a learning resource, so anything that helps others understand functional programming better is especially appreciated.
Ways to contribute:
- Improve domain logic or fix bugs
- Enhance learning content (
example.txt,questions.md,CLAUDE.md) - Add test cases that clarify behavior
- Refine documentation or usage instructions
- Propose new domain features that highlight core concepts
- Improve guidance for LLM-based workflows
See CONTRIBUTORS.md for details and contributor recognition.