Skip to content

Refactor my elixir runner #12

Description

@evantravers

Goal: Only build the "world state" once, run both methods on it so that IO is performed only once. I could even run both concurrently I suppose.

Use a Protocol or something where each day has to implement before/1 and p1/1 and p2/1. Running the day/0 method would run the before/1 and then run p1/1 and p2/2 on the state object that is resulting?

I could also consider using an Agent or GenServer to hold the world state? Interesting… I suppose if I can think in a concurrent model that would work. Maybe some simulation where each cell only needs to be aware of its neighbors?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions