Ozgur Akgun <ozgurak...@gmail.com> writes:

> 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.miljeno...@gmail.com
IvanMiljenovic.wordpress.com
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to