const returns its first argument and ignores its second. Its polymorphic type, a -> b -> a, allows the ignored value to have a different type. section 4.2.1
Applying only const's first argument creates a unary function. Thus, const True behaves like a function that accepts any value and returns True. section 4.2.1
Line-numbering predicates
Use numberLines (const True) (const True) to number every line. Replace the second constant with isNotEmpty to number only non-empty lines, or use isNotEmpty for both predicates to number and increment non-empty lines. section 4.2.1
const :: a -> b -> a const x = (\_ -> x)
Compare const's polymorphic definition with its equivalent form that explicitly ignores the second argument. section 4.2.1
numberAllLines :: [String] -> NumberedLines numberAllLines = numberLines (const True) (const True)
See const used through partial application to assemble a concise line-numbering function. section 4.2.1
