Rewriting it to: concatMap ($ p)[downPar , downNew , downTrans ]
gives: ($ p) =<< [downPar, downNew, downTrans] didn't check though! =@@i Edsko de Vries schreef: > Hi, > > Is there a nice way to write > > down :: Focus -> [Focus] > down p = concat [downPar p, downNew p, downTrans p] > > in point-free style? (In doesn't make much difference what these > functions do; if it helps, their types are downPar, downNew, downTrans > :: Focus -> [Focus]). > > Ideally, I would like to write something like > > down = downPar ... downNew ... downTrans > > but I'm not sure what should be on the dots. This works: > > down = concat . flip map [downPar, downNew, downTrans] . flip ($) > > but is extremely ugly and doesn't really explain what's going on :) > (It seems to me I should be able to take advantage of the list monad, > somehow). > > Pointers appreciated! > > Edsko > > _______________________________________________ > Haskell-Cafe mailing list > [email protected] > http://www.haskell.org/mailman/listinfo/haskell-cafe _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
