Comments (2)
So a few things that should probably happen before merging these in:
- Add documentation for all extensions.
- Ensure all iterator methods are marked
#[inline]
. - Ensure all iterators implement (where possible)
Clone
,RandomAccessIterator
,DoubleEndedIterator
. - Add an
unwrap
method to extract enclosed iterator where possible.
Any others iterator "best practices"?
Also, is there a macro companion for collect? Grabbag also contains three potentially useful macros:
collect!
which is likevec!
, but generalised to anything that supportsFromIterator
. Also has map syntax:collect!["a": 1, "b": 42]
.sequence!
for defining "closed form" mathematical sequence iterators; e.g. the non-negative evens could be written assequence![even[n]: u64 = 0... n as u64 * 2]
.recurrence!
for defining recurrence relationship iterators; e.g. the Fibonacci sequencerecurrence![fib[n]: f64 = 0.0, 1.0... fib[n-1] + fib[n-2]]
.
from collect-rs.
I wouldn't be fundamentally opposed to a macros
module. Also it's unclear to me that the iterators need to be marked #[inline]
. Ideally, Rust/llvm shouldn't need it. They're all generic methods, so they're available to inline cross-crate regardless.
from collect-rs.
Related Issues (20)
- solve the borrow issue with the LRU cache? HOT 12
- Try out some collection traits HOT 4
- Doc tests not running HOT 3
- Implement `into_iter` method for all collections
- Enhance `LinkedHashMap` HOT 3
- Add Haskell-style traversables HOT 3
- Document trait impl behavior HOT 2
- Compilation fails on rust master
- Clean up and enhance `TreeMap` HOT 7
- Disband collect-rs in favour of separate crates? HOT 33
- `TreeMap::insert`'s behavior differs from `{BTreeMap, HashMap}` HOT 5
- Deprecate `trie` in favor of external crate
- Push new version to crates.io HOT 1
- immut_slist -> cons-list?
- collect does not compile on nightly 3-21 HOT 2
- version was not bumped on crates.io? HOT 4
- Check out cool no-unsafe-code intrusive-style dlist HOT 3
- Tone down some greedy benches? HOT 1
- Some types are missing `Debug` impls HOT 3
- Be consistent with `Keys` and `Values` iterators HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from collect-rs.