
12 Apr
2005
12 Apr
'05
8:48 a.m.
Henning Thielemann
predicates a -> Bool selectors, transformators a -> a list-valued functions a -> [a]
What about providing combinators for the most common cases and provide lifting functions for the uncommon cases, such as
liftPred :: (a -> Bool) -> (a -> [a]) liftPred p x = if p x then [x] else []
liftTrans :: (a -> b) -> (a -> [b]) liftTrans f x = [f x]
Looks good. If you want to come up with a concrete design for an fuller set of alternative combinators, I'd be happy to include it into HaXml as a further choice of facility. Regards, Malcolm