2 Fix parenthesis spacing and type in the code segment edited Jun 24 '15 at 13:53 shiona 2,8591212 silver badges2222 bronze badges Use pointless  ( oror -free) notation where appropriate Often a function with one or two parameters can be written point free. So a lookup for a list of tuples whose elements are swapped is naïvely written as: revlookup :: Eq b => b -> [(a, b)] -> Maybe a revlookup e l=lookup e(map swap l)  (the type is there just to help you understand what it's doing.) for our purposes this is much better: revlookup=(.map swap).lookup  Use pointless( or -free) notation where appropriate Often a function with one or two parameters can be written point free. So a lookup for a list of tuples whose elements are swapped is naïvely written as: revlookup :: Eq b -> [(a, b)] -> a revlookup e l=lookup e(map swap l)  (the type is there just to help you understand what it's doing.) for our purposes this is much better: revlookup=(.map swap).lookup  Use pointless  (or -free) notation where appropriate Often a function with one or two parameters can be written point free. So a lookup for a list of tuples whose elements are swapped is naïvely written as: revlookup :: Eq b => b -> [(a, b)] -> Maybe a revlookup e l=lookup e(map swap l)  (the type is there just to help you understand what it's doing.) for our purposes this is much better: revlookup=(.map swap).lookup  Mod Removes Wiki by Doorknob♦ occurred Feb 20 '15 at 2:51 1 answered Jan 23 '14 at 20:09 shiona 2,8591212 silver badges2222 bronze badges Use pointless( or -free) notation where appropriate Often a function with one or two parameters can be written point free. So a lookup for a list of tuples whose elements are swapped is naïvely written as: revlookup :: Eq b -> [(a, b)] -> a revlookup e l=lookup e(map swap l)  (the type is there just to help you understand what it's doing.) for our purposes this is much better: revlookup=(.map swap).lookup