Learn Functional Programming with AI Tutors

Because Funx has comprehensive usage rules for every abstraction, it becomes an ideal teaching tool. Learn functional programming concepts through guided practice with Claude, ChatGPT, or other AI assistants.

Start Learning
Learn Funx with AI Tutors

Quick Start

1. Clone and Setup

git clone https://github.com/JKWA/learn_funx
cd learn_funx
mix deps.get

This downloads the practice environment and installs the Funx library dependencies.

2. Start Your AI Tutor

Launch Claude, ChatGPT, or your preferred AI assistant and give it this prompt:

"There are usage rules for this project and the Funx library.
Follow those functional patterns."

3. Start Exploring

Try the examples and ask questions:

iex -S mix
# Then paste commands from example.txt

Learning with LLMs

Why This Approach Works

  • Funx's comprehensive usage rules teach FP concepts systematically
  • Real project code that's imperfect and full of learning opportunities
  • AI tutors use these rules to guide you through proper FP patterns

Best Practices

  • Talk first – Discuss ideas before coding
  • Small experiments – Try one pattern at a time
  • Course correct – Keep them on functional patterns

Example Conversation Flow

You: "How should we handle validation with Either?"

AI: "Let's look at the Either patterns in the usage rules..."

You: "Show just one rule, in isolation"

AI: "Here's a simple Either validation example..."

You: "Good, but remember the usage rules about avoiding case statements"

AI: "You're right, let me use bind instead..."

This iterative approach keeps learning focused and prevents over-engineering.

Learning Path

1

Explore by Hand

Walk through example.txt in the root directory and paste commands into IEx.

iex -S mix
2

Use Questions to Guide Learning

See questions.md in 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.

Tips for Success

✓ Do This

  • • Reintroduce usage rules as sessions grow longer
  • • Ask for small, targeted changes
  • • Use the provided questions as conversation starters
  • • Focus on one pattern at a time
  • • Let the AI discover and reinforce good structure

✗ Avoid This

  • • Letting imperative habits creep in
  • • Asking for large rewrites
  • • Skipping the "talk first" step
  • • Over-engineering solutions
  • • Ignoring the usage rules