G64LUZSXYNCYM6OBDLBOCQODNVOF7EM4DUA2IFP43FR46RA5VR3AC runSteps :: StepFun s a -> s -> [a]runSteps (StepFun sf) = go
data Stream a = forall s. Stream(StepFun s a) -- ^ stepper function!s -- ^ current stateinstance Functor Stream wherefmap f (Stream step_ cst) = Stream (fmap f step_) cstunstream :: Stream a -> [a]unstream (Stream (StepFun sf) ctx) = go ctx
instance Functor Stream wherefmap f (Stream step_ cst) = Stream (fmap f step_) cstrunStream :: Stream a -> [a]runStream (Stream sf ctx) = runSteps sf ctx{-# INLINE runStream #-}
{-# RULES"gardground stream/unstream" forall (s :: Stream a). stream (unstream s) = s#-}