Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jkthorne/prime
A Crystal implementation of a prime number generator
https://github.com/jkthorne/prime
Last synced: 21 days ago
JSON representation
A Crystal implementation of a prime number generator
- Host: GitHub
- URL: https://github.com/jkthorne/prime
- Owner: jkthorne
- License: lgpl-3.0
- Created: 2020-02-25T05:25:35.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-25T05:49:27.000Z (almost 5 years ago)
- Last Synced: 2024-05-19T05:29:38.747Z (7 months ago)
- Language: Crystal
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-crystal - prime - A prime number generator (Data Generators)
README
# prime
[![Build Status](https://travis-ci.com/wontruefree/prime.svg?branch=master)](https://travis-ci.com/wontruefree/prime)
A basic implementation of a prime number generator.
## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
prime:
github: wontruefree/prime
```## Usage
```crystal
require "prime"primes = [] of Int32
Prime.each do |p|
break if p > 541
primes << p
end
```## Contributing
1. Fork it ()
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request## Contributors
- [Jack Thorne](https://github.com/wontruefree) - creator and maintainer