I studied Maths/CS but not Philosophy, so I am biased towards the "takes a domain has a range" and done some Haskell so "all programs are functions". It is interesting to see this point of view.
I see your point. sin(x) is more of a "natural function" born of the universe than f: f(x) = nn.layer(6, g: g(x) = nn.transformer(x, 512, ...