What are the advantage of User Defined function over store procedure

There are no of benefits of SQL Server User-Defined functions.Some of these are here we can use these functions in so many different places with comparison to SQL Server stored procedure.Two of user define function acts like a table (Inline and Multi-statement functions) helps developers to reduce the code and break complex logic in short code blocks.On the other hand Scalar User-Defined Function have ability so that we use this function anywhere where we
need some single value result or some of opertion.Combining these advantages with the ability to pass parameters into these database objects makes the SQL Server User-Defined function a very powerful tool.