eta icon indicating copy to clipboard operation
eta copied to clipboard

Problem with cycle function

Open jyothsnamutt opened this issue 10 years ago • 2 comments


module Main where

main = do
  print $ take 10 (cycle [1,2,3])

It works for take 1, 2 & 3, beyond that it hangs. It seems to be a problem with the cycle function.

jyothsnamutt avatar Sep 26 '16 13:09 jyothsnamutt

module Main where

main = do
  print $ take 10 (repeat 5)

Seems to be a problem with infinite data structures.

jyothsnamutt avatar Sep 26 '16 13:09 jyothsnamutt

Cycle fixed in #70, repeat has a new issue reported in #71

rahulmutt avatar Sep 30 '16 13:09 rahulmutt