I am writing a function like this.
func :: IO()
func = putStr print "func = putStr print"
I know it is incorrect but the idea is I want the putStr applied onto the string then print applied onto the same string "fun = .." so that the output would be:
func = putStr print "func = putStr print"
which is the same as my function definition. Thanks
If your goal is to write a quine (Another Haskell example given in this article too), you could use lambda notation for variable capture.