Talk:Fibonacci sequence: Difference between revisions

Content added Content deleted
Line 209: Line 209:
Folds are implemented recursively (either directly or indirectly) in the Prelude, and are generally understood as 'recursion schemes' in the sense of Meier et al. (See, for example, http://blog.sumtypeofway.com/an-introduction-to-recursion-schemes/ and the much-read paper which it references).
Folds are implemented recursively (either directly or indirectly) in the Prelude, and are generally understood as 'recursion schemes' in the sense of Meier et al. (See, for example, http://blog.sumtypeofway.com/an-introduction-to-recursion-schemes/ and the much-read paper which it references).


I also notice that other examples which have ended up in the 'Iteration' section might risk compounding a reader's confusion – they are either implemented by direct and immediate recursion on helper functions like '''go''' and '''next''', or are expressed in terms of zipWith, which is also implemented as a recursive function.
I also notice that other examples which have ended up in the 'Iteration' section might risk compounding a reader's confusion – they are either implemented by direct and immediate recursion on helper functions like '''go''' and '''next''', or are expressed in terms of '''zipWith''', '''scanl''' etc, which are also implemented as recursive functions.


Perhaps 'iteration' is not quite the clearest or best fitting term to use here ?
Perhaps 'iteration' is not quite the clearest or best fitting term to use here ?
[[User:Hout|Hout]] ([[User talk:Hout|talk]]) 19:31, 2 February 2017 (UTC)
[[User:Hout|Hout]] ([[User talk:Hout|talk]]) 19:31, 2 February 2017 (UTC)

FWIW, I that if we need to subdivide, the main distinction is '''memoising vs not memoising'''. If we feel a need to subdivide further and capture something like the category now labelled "Iterative", the perhaps what we really mean here is closer to ''direct and indirect recursion'' ? [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 19:44, 2 February 2017 (UTC)