Re: [Haskell-cafe] Help me understand general recursion from cata- and anamorphism

2013-06-23 Thread Takayuki Muranushi
Dear all, https://github.com/nushio3/practice/blob/master/recursion-schemes/FibTest.hs After learning fix-point operators, I found an answer by myself. ``` fibBase :: (Integer -> Integer) -> Integer -> Integer fibBase fib n | n <= 1= 1 | otherwise = fib (n-1) + fib (n-2) fibWithFix ::

[Haskell-cafe] Help me understand general recursion from cata- and anamorphism

2013-06-16 Thread Takayuki Muranushi
In an attempt to understand why cata- and anamorphisms are considered so important, I found multiple implications that you can write any recursive functions in terms of nonrecursive functions and ana, cata (am I right here?) so I'm trying to practice the rewrite by a few functions. I'm following a