
17 Jul
2006
17 Jul
'06
9:34 p.m.
Greg Fitzgerald wrote:
Assuming my last post was too hideous for anyone to take the time to attempt to comprehend, let me try to simplify: How can I extract the input of an arrow so that I can use it as a parameter of a normal function?
How do I implement 'f' such that it can call 'g'? f :: (ArrowXml a) => XmlTree -> a String XmlTree g :: (ArrowXml a) => String -> a XmlTree XmlTree
ArrowXml is a subclass of ArrowApply, so it is possible. For example: f xml = pure (\s -> (g s, xml)) >>> app The $< operator from Control.Arrow.ArrowList might also be useful ($<) :: (c -> a b d) -> a b c -> a b d Brandon