Mohl by mi někdo vysvětlit tohle? "Functional programming is declarative, which means that the form of a function doesn't entail its time complexity. For example, the school-taught formula for Fibonacci numbers can be evaluated by a functional interpreter in linear time. This is what's appealing about functional programming, for even monadic computations can be optimised to some extent. Likewise, theories in logic programming can be written simply as borders(alaska, yukon), borders(X,Y) :- borders(Y,X) and an inference engine will correctly account for the symmetry of the borders predicate. We needn't care about time complexity all that much."
Moc mi není jasné, jak ta optimalizace nastane sama od sebe.