https://github.com/rggh/missing_gap
Artihmetic Progression
https://github.com/rggh/missing_gap
arithmetic-progression closure rust
Last synced: 8 months ago
JSON representation
Artihmetic Progression
- Host: GitHub
- URL: https://github.com/rggh/missing_gap
- Owner: RGGH
- Created: 2024-11-07T15:38:43.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-07T15:49:04.000Z (over 1 year ago)
- Last Synced: 2025-03-28T01:55:21.058Z (about 1 year ago)
- Topics: arithmetic-progression, closure, rust
- Language: Rust
- Homepage: https://www.codewars.com/kata/52de553ebb55d1fca3000371/train/rust
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
[](https://github.com/RGGH/missing_gap/actions/workflows/rust.yml)
# Use closure in a function
* iterate from 1..seq.len()
* use hashmap to find number(gap) that occurs just once
we could use 3 functions ideally - but for codewars it was simpler to make 1 function and use a closure
plus I wanted to practice using closures more!