[Haskell-cafe] Looking for pointfree version

Robin Green greenrd at greenrd.org
Sun Feb 8 14:01:12 EST 2009


On Mon, 9 Feb 2009 14:18:18 +0000
Edsko de Vries <devriese at cs.tcd.ie> wrote:

> Hi,
> 
> Is there a nice way to write
> 
> down :: Focus -> [Focus]
> down p = concat [downPar p, downNew p, downTrans p]
> 
> in point-free style?

I think this should work:

down = concat . swing map [downPar, downNew, downTrans]

swing is defined at http://www.haskell.org/haskellwiki/Pointfree#Swing

-- 
Robin


More information about the Haskell-Cafe mailing list