
25 Sep
2012
25 Sep
'12
9:42 a.m.
On Mon, 24 Sep 2012 16:35:45 -0400
Brent Yorgey
My one suggestion might be to abstract out the "zippy apply" pattern, like so:
zipApp :: Traversable f => [a -> b] -> f a -> f b zipApp fs = fst . flip runState fs . T.mapM f where f x = ... etc, same as above
Then inlineSeps g = zipApp (id : repeat g), and you can reuse zipApp for other things.
Thanks! This is nicer, indeed. Perhaps, the last piece i'm missed for :)