Use this application to input and query facts.
- Install Elixir.
- Clone the repository: git clone github link
- Navigate to the directory:
- cd fact_finder_application
- Run the following command to compile the code: mix compile
- Run the following command to start the server: iex -S mix
- You can now input facts and queries:
- import FactFinder
- import FactMap
- FactFinder.input_fact("is_a_cat (lucy)") Inputs that lucy is a cat
- FactFinder.input_fact("are_friends (alex, sam)") Inputs that alex, sam are friends.
- FactFinder.input_fact("is_a_cat (Jenna)") and i can input that someone else is a cat and it wont override the last cat.
- FactFinder.query_facts("is_a_cat (X)") Will result in a list of everyone who is a cat
- FactFinder.match_fact("is_a_cat (lucy)")
Will return true if there is a match in our facts.txt file of the fact that lucy is a cat.