Neil Mitchell

Results 1069 comments of Neil Mitchell
trafficstars

I think I'd stick to just applyWhen for now - the monadic variants look a little weird (they take a monadic argument to a function, which is odd). Patch welcome...

``` flip = \f x y -> f y x const = \x _ -> x f = flip const f = (\f x y -> f y x) (\x...

I don't see why the 3rd line is a problem, but the 4th line isn't. The 4th line uses an inlined version of flip, so I don't see why it...

So both definitions of f have a problem? That I understand, but wasn't my understanding of your statement.

Hmm, or maybe I have come back to this thread after too long away. I'll have a reread in the morning when I'm more fresh.

Cool, I follow now. Given it's so easy to get this wrong, I'm thinking a function that is morally `flip const`, but without the space leak, would be a great...

My usual inclination is to build the state ignoring stuff into the function directly. E.g. `atomicModifyIORef_` doesn't require returning a redundant `()`. I think composing these things in is cute,...

While it is would be nice if they were pure, syntactically writing a NonEmpty, especially for a String is cumbersome - often the first arg is a constant. Perhaps safe...

I think GHCJS adding extra functions to a standard library is not a particularly smart move... They should have added isWindows to System.Info on all versions of Haskell instead. That...

Yep, that is almost inevitable. Any recommended suggestions? Documentation seems like a minimal first step.