On Wed, 17 Feb 2010, Neil Brown wrote:
I very often write this too (wanting function composition, but with a
two-argument function on the right hand side). The trick I picked up from
somewhere is to do:
fun = (runFun .) . someFun someDefault
I'm not too keen on that, as it seems clumsy.
On Fri, Feb 19, 2010 at 10:42 PM, wren ng thornton w...@freegeek.org wrote:
Sean Leather wrote:
The second option approaches the ideal pointfreeness (or pointlessness if
you prefer), but I'd like to go farther:
(...) :: (c - d) - (a - b - c) - a - b - d
(...) f g x y = f (g x y)
infixr 9
Matt Hellige wrote:
Thanks! I'm glad to know that people have found this approach useful.
In cases where it works, I find it somewhat cleaner than families of
combinators with (what I find to be) rather obscure names, or much
worse, impenetrable sections of (.). We can write the original example
Sean Leather wrote:
The second option approaches the ideal pointfreeness (or pointlessness if
you prefer), but I'd like to go farther:
(...) :: (c - d) - (a - b - c) - a - b - d
(...) f g x y = f (g x y)
infixr 9 ...
I go with infixl 8 personally. It seems to play better with some of the
On Wed, Feb 17, 2010 at 10:23 PM, Sean Leather leat...@cs.uu.nl wrote:
-- oo :: (c - d) - (a - b - c) - a - b - d
oo :: (Category cat) = cat c d - (a - cat b c) - a - cat b d
oo = (.) . (.)
I think at NL-FP day 2008 at Utrecht somebody called '(.) . (.)' the
'boob' operator... it was late and
I find myself often writing this pattern:
someFun x y z = ...
fun y z = runFun $ someFun someDefault y z
or, alternatively:
fun y = runFun . someFun someDefault y
The second option approaches the ideal pointfreeness (or pointlessness if
you prefer), but I'd like to go farther:
(...) ::
Sean Leather wrote:
I find myself often writing this pattern:
someFun x y z = ...
fun y z = runFun $ someFun someDefault y z
or, alternatively:
fun y = runFun . someFun someDefault y
I very often write this too (wanting function composition, but with a
two-argument
That signature is the `oo` specs combinator in Data.Aviary:
fun = runFun `oo` someFun someDefault
-md
begin Sean Leather quotation:
I find myself often writing this pattern:
someFun x y z = ...
fun y z = runFun $ someFun someDefault y z
or, alternatively:
fun y = runFun .
On 17 February 2010 15:41, Mike Dillon m...@embody.org wrote:
That signature is the `oo` specs combinator in Data.Aviary:
Hi Mike
Thanks - indeed, I was just looking up the thread that covered them a
month or two ago:
http://www.haskell.org/pipermail/haskell-cafe/2009-December/071392.html
I
Am Mittwoch 17 Februar 2010 16:31:16 schrieb Sean Leather:
I find myself often writing this pattern:
someFun x y z = ...
fun y z = runFun $ someFun someDefault y z
or, alternatively:
fun y = runFun . someFun someDefault y
The second option approaches the ideal pointfreeness (or
begin Stephen Tetley quotation:
On 17 February 2010 15:41, Mike Dillon m...@embody.org wrote:
That signature is the `oo` specs combinator in Data.Aviary:
Hi Mike
Thanks - indeed, I was just looking up the thread that covered them a
month or two ago:
On 17 February 2010 16:05, Mike Dillon m...@embody.org wrote:
...
Are you kidding me? I love writing code like this:
o = bunting bunting cardinal thrush blackbird
:)
Hi Mike
Thanks! - it took me a surprising amount of time to get from this
(where I cheated and used an online
On Wed, Feb 17, 2010 at 16:48, Stephen Tetley wrote:
On 17 February 2010 15:41, Mike Dillon m...@embody.org wrote:
That signature is the `oo` specs combinator in Data.Aviary:
Nice!
I wouldn't recommend writing code that depends on Data.Aviary, but
some of the combinators are often worth
Hi Sean
Thanks for the comment.
David Menendez pointed out on the other thread that they generalize
nicely to functors:
http://www.haskell.org/pipermail/haskell-cafe/2009-December/071428.html
Typographically they are a pun on ML's composition operator (o), if
you don't define o - (aka 'monocle'
14 matches
Mail list logo