Run, if you hear FP is declarative programming
medium.com
medium.com
Functional programming still includes the way of how to get the result, it's just about composing dynamically created functions, tail recursion and immutability. I constantly find it hard to accept that FP is of similar class as logic programming, while FP is to me closer to imperative programming than Prolog or SQL.
(I like functional programming very much; I just don't get it why it should be called "declarative".)