{"id":28424211,"url":"https://github.com/mpstyle/plazy","last_synced_at":"2025-10-11T19:06:29.694Z","repository":{"id":57020626,"uuid":"65025217","full_name":"MpStyle/plazy","owner":"MpStyle","description":"Another functional library for PHP 7","archived":false,"fork":false,"pushed_at":"2016-08-06T07:39:02.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-25T07:43:56.183Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MpStyle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-05T14:32:09.000Z","updated_at":"2016-08-05T14:50:25.000Z","dependencies_parsed_at":"2022-08-22T20:31:21.094Z","dependency_job_id":null,"html_url":"https://github.com/MpStyle/plazy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MpStyle/plazy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MpStyle%2Fplazy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MpStyle%2Fplazy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MpStyle%2Fplazy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MpStyle%2Fplazy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MpStyle","download_url":"https://codeload.github.com/MpStyle/plazy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MpStyle%2Fplazy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279008440,"owners_count":26084459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-05T10:10:21.271Z","updated_at":"2025-10-11T19:06:29.689Z","avatar_url":"https://github.com/MpStyle.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# plazy\nAnother functional library for PHP 7.\n\n## Quickstart\n\nTo use _plazy_ in your projects install _composer_ and add to your _composer.json_ file:\n```json\n\"require\": {\n    \"mpstyle/plazy\": \"0.2.3\"\n}\n```\n\nOr run:\n```\ncomposer require \"mpstyle/plazy\"\n```\n\n## Sequence\nThe sequence class allows you to build up a computation out of smaller operations. It's similar to Java 8 Streams\n\nNow we can try some of the following:\n```php\nSequence::sequence(1, 2, 3, 4)-\u003efilter(even); // lazily returns 2,4\nSequence::sequence(1, 2)-\u003emap(toString); // lazily returns \"1\", \"2\"\nSequence::sequence(1, 2, 3)-\u003etake(2); // lazily returns 1,2\nSequence::sequence(1, 2, 3)-\u003edrop(2); // lazily returns 3\nSequence::sequence(1, 2, 3)-\u003etail(); // lazily returns 2,3\nSequence::sequence(1, 2, 3)-\u003ehead(); // eagerly returns 1\nSequence::sequence(1, 3, 5)-\u003efind(even); // eagerly returns none()\nSequence::sequence(1, 2, 3)-\u003econtains(2); // eagerly returns true\nSequence::sequence(1, 2, 3)-\u003etoString(\":\"); // eagerly returns \"1:2:3\"\n```\n\n## Option\nOptional value - type-safe null\n\n## Functions\nplazy provides some interfaces for functional uages, such as:\n\n- F: to transform an object to another one.\n- Predicate: to filter/select/match an object.\n- Validator: to validate an object.\n\n## Developers\n\nTo run unit test, run in the root of the plazy project:\n```\ncomposer phptest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpstyle%2Fplazy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmpstyle%2Fplazy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpstyle%2Fplazy/lists"}