[Haskell-beginners] fractal x = fractal [y - head x + z | y <- x, z <- x] with take doesnt end

'2+ electriclightheads at gmail.com
Wed Mar 4 03:22:11 UTC 2015


hi!
since my

fractal :: [Int] -> [Int]
fractal x = [y - head x + z | y <- x, z <- x]

seems to be working fine with something like:

take 300 $ cycle $ fractal $ fractal $ [11..17] ++ [55..77]

wanted to twist the function to something totally recursive
but:

fractal x = fractal [y - head x + z | y <- x, z <- x]

experimented with:

take 300 $ fractal $ [11..17] ++ [55..77]

doesnt end its process and eat up the RAM

any hints to solve this issue?

thank you

----- 2g ---
http://sarigama.namaste.jp




More information about the Beginners mailing list