Git Product home page Git Product logo

Comments (10)

drupol avatar drupol commented on August 11, 2024 1

OK I understand, no problem! I'll look into it when I have a bit of time.

Sponsoring is greatly appreciated though.

from collection.

drupol avatar drupol commented on August 11, 2024

Hi there!

Super cool idea !

Are you willing to submit a PR?

Thanks

from collection.

rela589n avatar rela589n commented on August 11, 2024

Hi Pol, thanks for quick response!

Great to hear that!

Well, currently I have zero experience with functional programming and I doubt if this task is feasible for me. At least for now, this library looks like a black box with some magic inside. Not because something is wrong with it, - conversely it is me who is FP freshmen.

Thus, there will be no pull request from my side soon.

from collection.

drupol avatar drupol commented on August 11, 2024

Dear @rela589n,

I've implemented the feature in #314.

Would you be OK to test it?

Thanks!

from collection.

rela589n avatar rela589n commented on August 11, 2024

It would be nice

Though, I'm not sure where to start from. I assume at first I should check documentation page https://loophp-collection.readthedocs.io/en/latest/pages/tests.html , but what should I do then? Maybe you could point out some similar test(s) examples I can inspire implementation from. And "Static analysis tests" - something really new to me.

Thank you

from collection.

drupol avatar drupol commented on August 11, 2024

You could simply checkout the branch containing the new operation and create a simple file in the root of the project test.php, containing:

<?php

declare(strict_types=1);

namespace Test;

use loophp\collection\Collection;

require_once __DIR__ . '/vendor/autoload.php';

$collection = Collection::fromIterable([1, 2, 3])
    ->plus([4, 5, 6])
    ->plus(['a' => 'a']);

foreach ($collection as $i => $r) {
    var_dump($r);
}

So that you can play with the new operation and see if it corresponds to what you were expecting.

from collection.

rela589n avatar rela589n commented on August 11, 2024

I've checked it.

Works like a charm! It does exactly what is expected.

If you wish to add some unit tests, as a starting point you may use the following test case from my branch

feat/add-plus-operation...rela589n:loophp-collection:feat/add-plus-operation

Thank you!

from collection.

drupol avatar drupol commented on August 11, 2024

Thanks!
I'm using a specific workflow for tests based on data providers.
I made a new commit for tests, find it here: 9f29100

What would really help me is to create the documentation and the code example.

from collection.

github-actions avatar github-actions commented on August 11, 2024

Since this issue has not had any activity within the last 5 days, I have marked it as stale.
I will close it if no further activity occurs within the next 5 days.

from collection.

drupol avatar drupol commented on August 11, 2024

@rela589n Are you willing to contribute to the documentation of the associated PR ?

from collection.

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.