Added a Haskell datastructure to model loops,
added to functions as a field.