--       start: f--f--f-
--       rewrite: f → f+f--f+f

snowflake :: Int -> Command
snowflake x = f(x) :#: angle :#: angle :#: f(x) :#: angle :#: angle :#: f(x) :#: angle :#: angle
  where
    f 0 = GrabPen white :#: Go 10
    f x = f(x-1) :#: angle' :#: f(x-1) :#: angle :#: angle :#: f(x-1) :#: angle' :#: f(x-1)
    angle = Turn (-60)
    angle' = Turn (60)

-- -- Peano-Gosper:
--        angle: 60
--        start: f
--        rewrite: f → f+g++g-f--ff-g+ g → -f+gg++g+f--f-g