Ozgur Akgun <[email protected]> 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,
E.g, 'const' is useful when you need something to feed to a higher order
-- an element <=3 starts a new group
*Main> groupBy (const (>3)) [1,2,3,4,1,5,6]
Not the best example, perhaps, but the existence of const allows you to
easily reuse existing framework.
There's also 'par', although it's raison d'Ãtre is to have an effect on
the second parameter, so it is arguably "using" it.
If I haven't seen further, it is by standing in the footprints of giants
Haskell-Cafe mailing list