Representing Functions using Graphs