Function Composition: $ versus `.` Learn You a Haskell offers the findKey function:

Here's the book's implementation:

findKey :: (Eq k) =&gt; k -&gt; [(k,v)] -&gt; v  
findKey key xs = snd . head . filter (\(k,v) -&gt; key == k) $ xs  


I implemented it with $:

findKey' :: (Eq k) =&gt; k -&gt; [(k,v)] -&gt; v  
findKey' k xs = snd $ head $ filter ((== k) . fst) xs


As far as I can tell, it's a stylistic choice here to select . over $?

Lastly, is there a way to write findKey such that the [(k,v)] is curried &amp; thus not required in the signature of findKey key xs?
Both are fine, and it's a matter of choice.

The first definition, being a composition of functions, treats snd . head . filter (\(k, v) -&gt; key == k) as one big function.  It can therefore be transformed more easily into point-free style, if you like that kind of thing.

findKey'' :: (Eq k) =&gt; k -&gt; ([(k, v)] -&gt; v)
findKey'' key = snd . head . filter (\(k,v) -&gt; key == k)