Giter Club home page Giter Club logo

Comments (4)

HeinrichApfelmus avatar HeinrichApfelmus commented on June 14, 2024

Unlike filter, the function union is not in the Prelude, so you have to write import Data.List anyway and it's easier to add a qualified keyboard or hide imported functions.

I would really like to avoid giving prefixes to functions that are essentially the same.

Dropping union altogether in favor of the Monoid class would work, but this would make the documentation harder to understand. Sometimes, it's nice to have an explicit name for the monoid operation.

from reactive-banana.

HeinrichApfelmus avatar HeinrichApfelmus commented on June 14, 2024

(Oops, accidentally closed the issue by pressing the wrong button.)

from reactive-banana.

ehird avatar ehird commented on June 14, 2024

Yes, it is ugly to have a random subset of functions end with E. The only palatable thing I can think of of that form would be to suffix everything with E or B, and that's hardly better.

I agree that it can be nice to have a name for the Monoid operation, though the same documentation problem does exist with Behavior's Applicative instance. (I might be more on the side of Monoid if mappend was called (<>) :))

This isn't really a big deal, of course; just something I ran into unexpectedly. I'll leave the issue for you to close if you think it's fine.

(I keep accidentally closing issues, too.)

from reactive-banana.

HeinrichApfelmus avatar HeinrichApfelmus commented on June 14, 2024

Oh well, it looks like there's no perfect solution at the moment. I'll close this for now, maybe the future will bring some insights. But thanks for bringing it up anyway. :-)

from reactive-banana.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.