首页 > TAG信息列表 > streamRepeat

lazy ruler

lazy ruler streamRepeat :: a -> Stream a streamRepeat a = Cons a (streamRepeat a) streamToList :: Stream a -> [a] streamToList (Cons a xs) = a : streamToList xs instance Functor Stream where fmap f (Cons a b) = Cons (f a) (fmap f b) streamMap