SQL list of all the user defined functions in a database
You could use a CTE:
with functions(routine_name) as
(SELECT ROUTINE_NAME FROM information_schema.routines WHERE routine_type = 'function')
select
OBJECT_DEFINITION(OBJECT_ID(routine_name)) AS [Object Definition]
from
functions
SELECT name, definition, type_desc
FROM sys.sql_modules m
INNER JOIN sys.objects o
ON m.object_id=o.object_id
WHERE type_desc like '%function%'