Short form: is there a more idiomatic way to write (\a->[a])?
Long form: for any data type Foo a, if I have a function f :: Foo a -> band I need to write something like ...
wrapAndF a = f $ Foo a
... I can make it silent by writing
wrapAndF = f . Foo
But if my function g :: [a] -> bworks with lists, and my cover looks like this ...
wrapAndG a = g [a]
... What is the most idiomatic way to write this for free? I know I can write an explicit lambda:
wrapAndG = g . (\x->[x])
or, reflecting the use of the constructor in the Foo example, use the list constructor (:), but then I need to flip the arguments:
wrapAndG = g . flip (:) []
... ? a -> [a], Hoogle Data.List.
, , ( , , ), - , , , , - .