Giter Club home page Giter Club logo

bs-nonempty's People

Contributors

mlms13 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bs-nonempty's Issues

NonEmptyList.t broken when you update bs-platform

Studying your code, sir.

NonEmptyList.t does not tolerate updating the dependencies. Though obviously, it works with its oringal dependencies.

Here is the error, if it matters to you:

:1
  
  1 │ open BsAbstract.Interface;
  2 │ 
  3 │ module ArrayMonoid: MONOID_ANY with type t('a) = array('a) = {
  4 │   type t('a) = array('a);
  5 │   let append = Array.append;
  6 │   let empty = [||];
  7 │ };
  8 │ 
  9 │ module ArrayArrayLike: NonEmptyBase.ARRAY_LIKE with type t('a) = array(
      'a) = {
  
  Signature mismatch:
  ...
  Values do not match:
    let empty: array('_weak1)
  is not included in
    let empty: t('a)
  File "/Users/mandalarian/Github/bs-nonempty/node_modules/bs-abstract/src/interfaces/Interface.re", line 23, characters 49-65:
    Expected declaration
  File "/Users/mandalarian/Github/bs-nonempty/src/NonEmptyArray.re", line 6, characters 6-11:
    Actual declaration

Tried to think through it but here I am asking so....
Thanks for sharing.

Add eq (and zip/zip_with)

We're already talking about adding an elem function when the inner 'a is a member of EQ. If we're adding that, we might as well also eq for NonEmpty.t in that case and make NonEmpty implement EQ.

The easiest way to check Nels for equality is probably by zipping them together, so we'll want zip and zip_with as well.

Add functions: any, all, elem, find

let any: (('a => bool), NonEmptyList.t('a)) => bool;
let all: (('a => bool), NonEmptyList.t('a)) => bool;
let elem: ('a, NonEmptyList.t('a)) => bool; /* where 'a is a member of EQ */
let find: (('a => bool), NonEmptyList.t('a)) => option('a);

Although theoretically most of this could live in bs-abstract and come for free with FOLDABLE.

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.