
14 Jan
2010
14 Jan
'10
8:24 a.m.
Ozgur Akgun
Can someone give an example of a "reasonable" function that never uses one of its parameters, and justify the existence of that parameter in this case, please?
I would like to bring your attention to the "const" function: ,---- | const :: a -> b -> a | const a _ = a `---- For justification, I often use this function when I need to provide a function that takes two arguments by the function I want to use only needs one; as such either const of (flip const) can let me absorb and ignore the unneeded argument. Satisfied? ;-) -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com