In 3 previous episodes we built a Logo interpreter and a module for evolving L Systems. Today we'll combine them to show how you can generate interesting graphics. Let's get started.

I've tagged the fractal_playground with before_episode_169

We'll add the logo project to our dependencies:

{:logo, github: "knewter/logo"}
mix deps.get

OK, now we're going to just build a quick test for a module that reduces a string into a list of functions and arguments to apply against our turtle:

defmodule LogoMappingTest do use ExUnit.Case # We expect to have a list of mappings from a character to a function and # arguments. Here I'll define some we'll use later. @mappings %{ "A" => {:forward, [10]}, "-" => {:right, [30]}, "B" => {:forward, [10]}, "+" => {:left, [30]}, } # Now we want to make sure that our mapping works. test "maps an alphabet to logo function calls" do assert [ {:forward, [10]},...