Talk:Compose

From HaskellWiki
Revision as of 15:09, 17 May 2006 by Dtlin (talk | contribs)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Reading this page got me to write an arrow version of compose. Don't know if it should be included or not since it isn't a monadic solution.

composeArrow :: [a -> a] -> a -> a
composeArrow = foldr ((>>>) . arr) (arr id)

Or maybe this:
composeArrow :: [a -> a] -> a -> a composeArrow = foldl ((>>>) . arr) returnA