Code Monkey home page Code Monkey logo

Comments (6)

singpolyma avatar singpolyma commented on June 15, 2024

I'm not sure about the read/show stuff. I like read/show, but it seems like maybe they don't really belong in CorePrelude.

I do agree with the rest of these, though.

from basic-prelude.

singpolyma avatar singpolyma commented on June 15, 2024

Some things that might be nice:

  • Data.Ord.ordering
  • Data.Char.is*

from basic-prelude.

singpolyma avatar singpolyma commented on June 15, 2024

Ooh, and maybe Data.Function.on

from basic-prelude.

snoyberg avatar snoyberg commented on June 15, 2024

I agree with @singpolyma about read/show stuff. I like everything else @DanBurton mentioned, and also like ordering and on. I'm on the fence, however, with the is* functions. It's definitely convenient, but may be encouraging a bad practice (treating textual data one character at a time, which isn't always Unicode-aware).

from basic-prelude.

DanBurton avatar DanBurton commented on June 15, 2024

I've added $!, seq, curry, until, asTypeOf, undefined, on, comparing, and equating to CorePrelude.

I was under the impression that Data.Ord.ordering existed, and functioned like its maybe and either counterparts, but apparently it does not. Should we add it?

ordering :: a -> a -> a -> Ordering -> a
ordering lt eq gt o = case o of
  LT -> lt; EQ -> eq; GT -> gt

The type Ordering is already exported.

from basic-prelude.

snoyberg avatar snoyberg commented on June 15, 2024

I can't say I've ever been writing code where I wanted a function like ordering, so it doesn't seem very generally useful to me. I'd go further and say it's problematic: it's far too easy to swap the lt and eq arguments, for example, as opposed to maybe and either, where the types will (generally) prevent you from making such a mistake.

from basic-prelude.

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.