AI Tutor for Functional Programming

Funx opens the door to guided exploration. One prompt gives your AI assistant everything it needs to teach you functional programming.

Usage rules are the specs that tell your AI assistant how patterns behave, when to suggest them, and why they matter. With them, your AI tutor can guide you, not just autocomplete.

Pair this with the book Advanced Functional Programming with Elixir for a complete guided learning path.

Learn Funx with AI Tutors
📚

Complement Your Reading

Reinforce what you learn with immediate feedback while working through FP concepts from books or courses

âš¡

Instant Feedback

Get real-time feedback, the heart of deliberate practice

🧠

Build Intuition

You’ll start to think in patterns, so functional programming feels intuitive.

Quick Start

1. Clone and Setup

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

This sets up a fully working project with example code and everything your AI tutor needs.

2. Start Your AI Tutor

Open Claude, ChatGPT, or any AI assistant and provide the learning prompt:

> There are usage rules for this project and the Funx library.

3. Start Exploring

Try questions like:

> How should I think about validation using Either?

This project contains nontrivial code written in a functional style. It is closer to a real project than a polished demo, with design choices and oversights to explore. These quirks are part of the learning process, giving you and the tutor material to work with as you practice and build intuition step by step.

How It Works

Funx as Teacher

  • • When you give the prompt, you give the AI the scaffolding it needs to teach functional programming with Funx
  • • You learn through guided exploration of real code patterns

Best Practices

  • • Talk first – Discuss ideas before coding
  • • Small experiments – Try one pattern at a time
  • • Course correct – Guide it back to functional patterns when it strays

The Teaching Loop

Give your AI assistant the prompt, then explore patterns by asking focused questions. The AI will guide you with specific, focused examples that follow best practices.

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

Learning Path

1

Start Your AI Tutor

Launch Claude, ChatGPT, or your preferred AI assistant and give it the prompt to begin your functional programming journey.

2

Explore with Guided Questions

The project includes structured learning questions from basic concepts to advanced patterns. Here's how it builds up:

Beginner: Explore core concepts — try: "What's the point of implementing Eq when I can just use ==?"
Intermediate: Compose patterns together — try: "How does bind eliminate defensive coding?"
Advanced: Architect real systems — try: "How does Effect combine Reader and Either patterns?"
3

Modify and Extend

Extend the system. Try adding new entities or rules, and ask where the patterns still hold—and where they don't.

Tips for Success

✓ Do This

  • • Experiment with one pattern until it clicks—small wins build confidence
  • • After each experiment, ask: "What changed? Why did that pattern help?"
  • • Reintroduce the learning prompt as sessions grow longer
  • • Ask for small, targeted changes
  • • Use the provided questions as conversation starters
  • • Focus on one pattern at a time

✗ Avoid This

  • • Ignoring mistakes—mistakes help make the structure stronger when discussed
  • • Letting imperative habits creep in
  • • Asking for large rewrites
  • • Skipping the "talk first" step
  • • Over-engineering solutions

Start Your Learning Journey Today

Start small. Use the prompt today. Ask your first guided question. Let this be your path toward understanding—not just reading or memorizing. Funx is here to help you think in FP, step by step.