New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

LazyEnumerable

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

LazyEnumerable

  • 0.0.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Comment Unit Tests

Author:: Blaine Buxton (mailto:altodorado@blainebuxton.com)

License:: See LICENSE

It takes a functional approach to the common Enumerable protocol of select, collect, and reject.

By functional, I mean the collection is not changed nor is a new modified one created.

The blocks are kept around until they are absolutely needed.

I have been wanting this functionality for some time because it's nice for large collections.

If you have a collection in which you are calling a lot selects, rejects, or collects on,

then this will not create the intermediate collections.

It will wait until you ask something of the collection where it can not delay the answer.

This should make these chained operations must faster on large collections.

This was a lot of fun to program and it's not that big. Take whatever you want from it!

Read the tests to see how it works!

If you learn anything from this please feel to send me an email!

Check out the tests for examples.

FAQs

Package last updated on 25 Jul 2009

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc