(??) is misleading, some may be tempted to write things like: func ?? 45 ??
x , forgetting that ?? is just a mere operator, not a syntactic convenience.
Unfortunately, Haskell doesn't provide Scala's underscore for partially
applied functions: func(56, _, foo, _)
aditya siram wrote:
Eta-reducing is nice, and sometimes it makes code more readable. But 'flip'
is one of those functions that always seems to hinder rather than help
readability, conversely factoring out flip always makes code easier to
comprehend. I don't see a need for its existence - maybe
On Sun, Jul 25, 2010 at 11:53 PM, Edward Z. Yang ezy...@mit.edu wrote:
An interesting alternate spin on flip is infix notation combined with partial
application, such as:
(`foobar` 3)
which is equivalent to
\x - foobar x 3
I frequently use this, although the jury's out on whether
On 26 July 2010 16:33, David Virebayre dav.vire+hask...@gmail.com wrote:
On Sun, Jul 25, 2010 at 11:53 PM, Edward Z. Yang ezy...@mit.edu wrote:
An interesting alternate spin on flip is infix notation combined with partial
application, such as:
(`foobar` 3)
which is equivalent to
\x
On 26.07.2010 08:33, David Virebayre wrote:
listeEtagTot = concatMap (`listeEtagArm` cfgTypesTringle) listeArmOrd
You can use flip as a wildcard aswell:
listeEtagTot = concatMap (listeEtagArm `flip` cfgTypesTringle)
listeArmOrd
Makes it even more readable in my opinion, since this really
That's just cool. I now reverse my original statement - 'flip' does have
it's place in the pantheon of standard Haskell functions.
-deech
On Mon, Jul 26, 2010 at 3:42 PM, Nils m...@n-sch.de wrote:
On 26.07.2010 08:33, David Virebayre wrote:
listeEtagTot = concatMap (`listeEtagArm`
On Mon, Jul 26, 2010 at 10:42 PM, Nils m...@n-sch.de wrote:
On 26.07.2010 08:33, David Virebayre wrote:
listeEtagTot = concatMap (`listeEtagArm` cfgTypesTringle) listeArmOrd
You can use flip as a wildcard aswell:
listeEtagTot = concatMap (listeEtagArm `flip` cfgTypesTringle) listeArmOrd
On Monday 26 July 2010 23:25:27, Max Rabkin wrote:
It took me a fair while (I'm talking on the order of half a minute) to
figure out what that meant, but it's pretty cool.
Yeah, really neat.
Maybe a different
name would be better? How about (??) or it?
listeEtagTot = concatMap
2010/7/26 Daniel Fischer daniel.is.fisc...@web.de:
On Monday 26 July 2010 23:25:27, Max Rabkin wrote:
It took me a fair while (I'm talking on the order of half a minute) to
figure out what that meant, but it's pretty cool.
Yeah, really neat.
Maybe a different
name would be better? How
2010/7/26 Vo Minh Thu not...@gmail.com:
2010/7/26 Daniel Fischer daniel.is.fisc...@web.de:
On Monday 26 July 2010 23:25:27, Max Rabkin wrote:
It took me a fair while (I'm talking on the order of half a minute) to
figure out what that meant, but it's pretty cool.
Yeah, really neat.
Maybe a
It seems confusing to alias a function without adding any functionality just
to make things slightly easier to read. Instead wouldn't it be better if
this idiom were documented on haskell.org?
-deech
On Mon, Jul 26, 2010 at 4:47 PM, Vo Minh Thu not...@gmail.com wrote:
2010/7/26 Vo Minh Thu
I think it is pretty cool as well. But I think there is a problem with
viewing it as a wildcard.
let's say we define the following:
(??) = flip
foo :: a - b - c
foo ?? x :: a - c
Perfect!
But saying ?? can be used as a wildcard might in the following wrong
perception:
foo x ?? :: b - c --
IMO, if you really want a wildcard, just write a lambda...
\x - foo 1 x 3
Cheers,
Edward
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On 26.07.2010 23:55, Ozgur Akgun wrote:
I think it is pretty cool as well. But I think there is a problem with
viewing it as a wildcard.
let's say we define the following:
(??) = flip
foo :: a - b - c
foo ?? x :: a - c
Perfect!
But saying ?? can be used as a wildcard might in the following
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 7/26/10 17:53 , aditya siram wrote:
It seems confusing to alias a function without adding any functionality just
to make things slightly easier to read. Instead wouldn't it be better if
this idiom were documented on haskell.org
Seconded.
On Monday Jul 26, 2010, at 6:24 PM, Edward Z. Yang wrote:
IMO, if you really want a wildcard, just write a lambda...
\x - foo 1 x 3
Cheers,
Edward
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On Sun, Jul 25, 2010 at 4:13 PM, aditya siram aditya.si...@gmail.com wrote:
Eta-reducing is nice, and sometimes it makes code more readable. But 'flip'
is one of those functions that always seems to hinder rather than help
readability, conversely factoring out flip always makes code easier to
On Sunday 25 July 2010 23:13:16, aditya siram wrote:
Eta-reducing is nice, and sometimes it makes code more readable. But
'flip' is one of those functions that always seems to hinder rather than
help readability, conversely factoring out flip always makes code easier
to comprehend. I don't see
Excerpts from aditya siram's message of Sun Jul 25 17:13:16 -0400 2010:
Eta-reducing is nice, and sometimes it makes code more readable. But 'flip'
is one of those functions that always seems to hinder rather than help
readability, conversely factoring out flip always makes code easier to
19 matches
Mail list logo