{"id":13503103,"url":"https://github.com/killercup/a-range","last_synced_at":"2025-06-19T06:37:05.827Z","repository":{"id":57492318,"uuid":"153617628","full_name":"killercup/a-range","owner":"killercup","description":"Write quick and explict ranges in Rust","archived":false,"fork":false,"pushed_at":"2019-10-08T19:12:36.000Z","size":42,"stargazers_count":15,"open_issues_count":4,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-12T03:25:01.001Z","etag":null,"topics":["library","rust"],"latest_commit_sha":null,"homepage":"https://docs.rs/a-range","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/killercup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-18T12:08:05.000Z","updated_at":"2021-09-27T02:50:30.000Z","dependencies_parsed_at":"2022-09-02T00:21:05.941Z","dependency_job_id":null,"html_url":"https://github.com/killercup/a-range","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killercup%2Fa-range","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killercup%2Fa-range/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killercup%2Fa-range/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killercup%2Fa-range/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/killercup","download_url":"https://codeload.github.com/killercup/a-range/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226888089,"owners_count":17698110,"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","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":["library","rust"],"created_at":"2024-07-31T22:02:37.185Z","updated_at":"2024-12-03T20:58:44.473Z","avatar_url":"https://github.com/killercup.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# A Range\n\n\u003e **Write quick and explict ranges in Rust**\n\n[![Build Status](https://travis-ci.com/killercup/a-range.svg?branch=master)](https://travis-ci.com/killercup/a-range)\n[![crates.io](https://img.shields.io/crates/v/a-range.svg)](https://crates.io/crates/a-range)\n[![docs](https://img.shields.io/badge/api_docs-latest-blue.svg)](https://docs.rs/a-range)\n\n## Example\n\n```rust\nextern crate a_range;\n\n// Create upward-counting inclusive ranges\nlet days_of_xmas = a_range::from(1).up_to(12);\nlet expected = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];\nassert_eq!(days_of_xmas.to_vec(), expected);\n\n// Just as easily count backwards\nlet apollo_countdown = a_range::from(100).down_to(0);\nlet expected: Vec\u003ci32\u003e = (0..101).rev().collect();\nassert_eq!(apollo_countdown.to_vec(), expected);\n\n// Infinite ranges are also fun\nlet naturals = a_range::from(0).up_to_infinity();\nlet until_four: Vec\u003ci32\u003e = naturals.into_iter().take(5).collect();\nassert_eq!(until_four, vec![0, 1, 2, 3, 4]);\n```\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the Apache-2.0\nlicense, shall be dual licensed as above, without any additional terms or\nconditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkillercup%2Fa-range","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkillercup%2Fa-range","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkillercup%2Fa-range/lists"}