r4 1.0.1

A compact macro that generates iterators using for comprehensions and natural Rust syntax.
Documentation
  • Coverage
  • 75%
    3 out of 4 items documented2 out of 3 items with examples
  • Size
  • Source code size: 33.49 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.51 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • dstu/r4
    6 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • dstu

r4: for comprehensions for Rust

This package provides the iterate! macro, which builds for comprehensions out of nested flat-map operations. If you're familiar with Python's list comprehensions or Scala's for statement, the syntax should be familiar.

See rustdocs for usage, examples, and a more detailed description of the macro's internals.

To-do

  • Examine overhead introduced by nesting closures instead of using naked loops.
  • Benchmark.
  • ?Figure out how to avoid moving values we don't have to.
  • ?Figure out how to avoid creating some new iterators unnecessarily.

Copyright

Copyright 2015-2018, Donald S. Black.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.