https://github.com/c1m50c/twin-primes
Repository based on a Computerphile video, "Infinite Data Structures: To Infinity & Beyond!"
https://github.com/c1m50c/twin-primes
computerphile haskell lazy-evaluation mit-license prime-numbers
Last synced: 18 days ago
JSON representation
Repository based on a Computerphile video, "Infinite Data Structures: To Infinity & Beyond!"
- Host: GitHub
- URL: https://github.com/c1m50c/twin-primes
- Owner: c1m50c
- License: mit
- Created: 2021-10-17T21:17:27.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-17T21:39:49.000Z (over 4 years ago)
- Last Synced: 2025-12-30T14:42:58.034Z (5 months ago)
- Topics: computerphile, haskell, lazy-evaluation, mit-license, prime-numbers
- Language: Haskell
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# **twin-primes**
Based on a Computerphile video,
"Infinite Data Structures: To Infinity & Beyond!".
## How it works
It works based on the lazyness of Haskell and infinite lists. We calculate all primes with the Sieve of Eratosthenes Algorithm, then loop over the primes for twins.
## Running
First install Haskell, and then run the following commands within a terminal.
```bash
$ cd twin-primes # Change directory to `twin-primes`
$ cabal run # Compile and run the application.
```