Skip to content

Instantly share code, notes, and snippets.

@JosephLenton
Last active November 6, 2015 16:03
Show Gist options
  • Select an option

  • Save JosephLenton/d97f8ada758803c185d6 to your computer and use it in GitHub Desktop.

Select an option

Save JosephLenton/d97f8ada758803c185d6 to your computer and use it in GitHub Desktop.

Revisions

  1. JosephLenton revised this gist Nov 6, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    Animal = { id, name }

    -- a way to describe an animal
    Description = { id, option_id, name }
    Description = { id, option_num, name }

    -- example descriptions
    Descriptions =
    @@ -23,4 +23,4 @@ Descriptions =
    -- many more ways to describe animals

    -- descriptions for my animals
    AnimalDescription = { Animal.id, Description.id }
    AnimalDescription = { Animal.id, Description.id, Description.option_num }
  2. JosephLenton created this gist Nov 6, 2015.
    26 changes: 26 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@

    -- the animals in my zoo
    Animal = { id, name }

    -- a way to describe an animal
    Description = { id, option_id, name }

    -- example descriptions
    Descriptions =
    -- size
    { 1, 1, "small" }
    { 1, 2, "large" }
    { 1, 3, "huge" }
    -- skin
    { 2, 1, "no furr" }
    { 2, 2, "furr" }
    { 2, 3, "scales" }
    -- colour
    { 3, 1, "black" }
    { 3, 2, "white" }
    { 3, 3, "red" }

    -- many more ways to describe animals

    -- descriptions for my animals
    AnimalDescription = { Animal.id, Description.id }