Applying multiple functions to the same value point-free style in Haskell

Viewed 4953

I was bored one day and wanted to exercise my brain, so I decided to do the 99 Haskell Problems but restricted myself to doing them in point-free style. A problem that seems to crop up a lot when I'm doing things in point-free style is this: How do you apply multiple functions to the same value while keeping each result as an independent entity? Using pointed notation:

foobar x = [id x, reverse x]

And what I've come up with so far in point-free notation:

foobar' = `map` [id, reverse] ($ x)

I can't seem to get that x off the end of there.

4 Answers
Related