Not sure that I'll ever have to use your functions (I hope not!) but I was intrigued by your code to verify the existence of the function before creating (in fact altering) it.
There's one occurrence of what I would selfishly call 'standard code' (although I suspect it was left in the script by accident).
IF OBJECT_ID('dbo.shiftRight0', 'IF') IS NOT NULL
DROP FUNCTION [dbo].[shiftRight0]
The other examples are of the following format.
IF OBJECT_ID('dbo.shiftRight', 'IF') IS NULL
EXEC('CREATE FUNCTION [dbo].[shiftRight]() RETURNS TABLE AS RETURN SELECT foo = 1')
ALTER FUNCTION [dbo].[shiftRight] (
I can see what's going on, but I'd like to know why. At a guess, I'd say that by altering rather than drop / creating, you conserve permissions. Or is there another reason?