
On 4 August 2011 23:53, Michael Litchard
I'm finding that in more than one instance I pass a data structure to a function, simply so that I can pass it to it's helper function. It bugs me that I'm passing a value that isn't being used directly. This seems wrong. Example: I have a "data URLSequence" that contains a way to calculate the ip address of a URL. This gets passed to a helper function that generates a particular URL, which then populates the URLSequence. Is there a standard practice to avoid what I am talking about? Or is this normal and I should accept it?
There is implicit parameters[1], but personally I bite the bullet in cases like this as it doesn't happen so often. [1] http://www.haskell.org/ghc/docs/7.0.3/html/users_guide/other-type-extensions...