I am not sure if I ever clearly understood standard corollary "what to solve" and "how to solve" used to point out difference between functional (declarative) and imperative programming paradigm respectively.
In most of places where this difference is explained is often supplemented with example where some loop control structure is used to imply imperative way of solving problem where recursive method is used to imply declarative way of solving problem. I am not too much hung up on loop control structure vs recursive method.
For example, to me below method of finding length of list (say in Haskell) is just different way of saying "how to solve" problem vs having a for loop
in c#/java
and increasing counter till the end of list.
Len :: [Int] -> Int
Len [] = 0
Len [x:xs] = 1 + Len(xs)
Isn't above code snippet is just different way of saying "how to solve" problem ? If yes, then I think its more of defining boundary on "how" part between imperative and declarative programming.
Please help on clarifying this with some better example. Thanks !!