Lib for well-known functions

This reveals a lexer bug that needs addressing.