“I’m not even sure what’s real anymore.” —The Matrix (1999)

I come from a music background, and I tend to teach through the lens of Peak.

In a nutshell, it means:

  • Working just beyond your current skill
  • Setting clear goals and tracking progress
  • Getting immediate, actionable feedback
  • Learning with guidance from someone who knows the path

My book lights the path. It offers feedback via iex examples that readers can experiment with. But asking someone to download code and tinker in iex is a lot to ask.

I published the examples as Livebooks to reduce friction. That helped, but I’m still not satisfied with the learner’s feedback loop.

At ElixirConf, there was a lot of talk about agents and LLMs. What caught my attention was the idea of usage rules: we have docs for humans, and usage rules are the docs for LLMs.

What really intrigued me was the idea of indexing these rules. Rather than front-loading the LLM with all the usage rules, we can give it an index, allowing it to find and assemble what it needs for a specific situation.

Since I wrote both the book and the library, I already had a lot of context. It was just a matter of embedding that context into usage rules for Funx. With rules in place, an LLM can do a better job of interacting with the library.

What if we take it one step further? What about a project designed to tutor? Could we improve the immediate feedback problem with an admittedly overly-nice and sometimes-wandering tutor?

I’ve had a few friends try it out, and the consensus seems to be: “I don’t know how I feel about this.”

You can check it out on the Funx website.

Or dive right in:

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

Then launch your LLM (Claude, ChatGPT, or another assistant) and ask it to look for usage rules in this project and in Funx.


Advanced Functional Programming with Elixir

Dive deeper into functional programming patterns and advanced Elixir techniques. Learn how to build robust, maintainable applications using functional programming principles.

Funx - Functional Programming for Elixir

A library of functional programming abstractions for Elixir, including monads, monoids, Eq, Ord, and more. Built as an ecosystem where learning is the priority from the start.