A LITTLE THEORY. A LOT OF POSSIBILITY.

Magical
Haskell.

A new way to think.
A little magic to get you there.

Discover the beauty of functional programming, from the first spark of type theory to building your own AI agents.

THE ART OF THINKING FUNCTIONALLY
Magical Haskell by Anton Antich — the purple and gold Apress book cover
FROMtypes to AIONE BEAUTIFUL JOURNEY
FOR THE BEAUTIFULLY CURIOUS.01 / 13
13Chapters of discovery
74Illustrations along the way
2025First edition · Apress
Paperback & eBook
A DIFFERENT KIND OF PROGRAMMING BOOK

Big ideas.
Gentle beginnings.

There’s a beautiful language hiding behind the unfamiliar symbols.

Explore it through playful metaphors, visual explanations, and code you can make your own. Build an intuition for types, learn how programs fit together, and follow those ideas all the way to practical AI.

For curious programmers, Haskell enthusiasts, and anyone who has ever wondered what all the monad fuss is about.

Read the publisher’s overview
TypesFunctionsCompositionPossibilities✧
BETWEEN THE COVERS

Follow your
curiosity.

Thirteen chapters. A path from first principles to programs with a mind of their own.

Full table of contents

Small functions.
Wonderful things.

01CHAPTERS 01—03Think in types.

Begin with an idea, a little imagination, and the building blocks of a new language.

  1. Types & functions
  2. Building new types
  3. Type & category theory, gently introduced
02CHAPTERS 04—08Find your composition.

Connect small pieces into expressive programs. Put the abstractions to work in a game of blackjack.

  1. Typeclasses & monoids
  2. Functors & applicatives
  3. Composing with monads
  4. I/O & transformer stacks
  5. A complete blackjack program
03CHAPTERS 09—13Make it intelligent.

Take functional ideas into AI: from your first chat agent to retrieval and multi-agent systems.

  1. Getting started with AI
  2. A terminal chat agent
  3. An AI framework for the web
  4. Deeper into Haskell & retrieval
  5. Multi-agent systems & Arrows

A gentle start. Plenty of room to go deep.

a little composition.hsHASKELL
-- Small pieces. New possibilities.

spark :: String -> String
spark idea = idea ++ "!"

wonder :: String -> String
wonder = spark . reverse

-- λ> wonder "lleksaH"
-- "Haskell!"
READ IT. RUN IT. MAKE IT YOURS.

The magic is
in the making.

The book’s companion code is on GitHub. Explore the examples, experiment with an idea, and see where it takes you.

Explore the source code
git clone …/magicalhaskell.git
Also available in the Apress repository
Anton Antich, author of Magical HaskellTHE HUMAN BEHIND THE HASKELL
A NOTE ABOUT THE AUTHOR

Hello, I’m
Anton Antich.

Entrepreneur by trade.
Curious about how things work, always.

With a background in physics and a fascination for AI, type theory, and functional programming, I wrote Magical Haskell to make these ideas more approachable—and share the pleasure of figuring them out.

YOUR NEXT CHAPTER

A little curiosity.
Infinite possibilities.

Let’s make something magical.

Available in paperback, PDF & EPUB.