https://github.com/gnlow/iteruyo
Functional iterator for TypeScript
https://github.com/gnlow/iteruyo
fp iterator typescript
Last synced: 6 months ago
JSON representation
Functional iterator for TypeScript
- Host: GitHub
- URL: https://github.com/gnlow/iteruyo
- Owner: gnlow
- License: mit
- Created: 2023-05-26T02:30:29.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-02T11:53:21.000Z (about 3 years ago)
- Last Synced: 2024-12-30T14:48:42.403Z (over 1 year ago)
- Topics: fp, iterator, typescript
- Language: TypeScript
- Homepage: https://deno.land/x/iteruyo
- Size: 26.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# iteruyo
```ts
import { $ } from "https://deno.land/x/iteruyo/mod.ts"
$([1, 2, 3, 4, 5])
.filter(x => x % 2 === 0)
.map(x => x * 2)
.forEach(console.log) // 4 8
```
```ts
$([1, 2, 3, 4, 5])
.multiFold(function*(o, i) {
yield o + i
return o + i
})
```