how do you define functions with denotational semantics?
People have been writing denotational semantics for all kinds of
languages since the late seventies.  The list must now be quite long,
and include large real languages, but I never tried to check what is in
it. The number of books is probably large too.  What you want is to look at toy
examples.  Anything real is not a good idea for a start. Some are probably in (text)books.

There were some references to such examples in A simple programming language?
You may try it ... I did not check the answers.

In some cases people had to write a formal semantics because they
wanted to prove correctness of the compiler. Still much research on this.


  Denotational semantics are abstract functions that give meaning to
  statements of a programming language. They accept an expression and
  return a value.


Well, only in the sense that any well formed program fragment may be seen syntactically as an expression (a formula), and anything may be seen as a value in
denotational semantics, including functions (values belong to domains ... which you can understand approximately as types). Actually the semantics
function takes a syntactic formula (you can read "formula" as
"abstract syntax tree") and returns a function expressing what that
formula is supposed to mean ...  or to do when run as (part of) a complete
program.

How you write the semantics, and what domains you use is highly
dependent on what kind of features exist in you language. For example,
if you have exceptions, things may get a bit more complicated.

But just try toy examples to begin with.  And then more.