Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yusukehosonuma/flatten
Flatten method reference that resolved to SE-0042.
https://github.com/yusukehosonuma/flatten
functional-programming swift
Last synced: 1 day ago
JSON representation
Flatten method reference that resolved to SE-0042.
- Host: GitHub
- URL: https://github.com/yusukehosonuma/flatten
- Owner: YusukeHosonuma
- License: mit
- Created: 2020-03-27T05:32:35.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-07-22T05:44:54.000Z (over 2 years ago)
- Last Synced: 2025-01-18T16:41:36.714Z (6 days ago)
- Topics: functional-programming, swift
- Language: Swift
- Size: 30.3 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flatten
[![CocoaPods](https://img.shields.io/cocoapods/v/Flatten.svg)](https://cocoapods.org/pods/Flatten)
![SPM Compatible](https://img.shields.io/badge/SPM-compatible-4BC51D.svg?style=flat)
[![License](https://img.shields.io/github/license/YusukeHosonuma/Flatten)](https://github.com/YusukeHosonuma/Flatten/blob/master/LICENSE)
[![Twitter](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Ftwitter.com%2Ftobi462)](https://twitter.com/tobi462)Flatten instance method reference that resolved to [SE-0042](https://github.com/apple/swift-evolution/blob/master/proposals/0042-flatten-method-types.md).
```swift
let f: (String) -> (String) -> Bool = String.hasPrefix// function is curried
f("Hello")("He") // => truelet __f: (String, String) -> Bool = flatten(f)
// function is flattend
__f("Hello", "He") // => true
```## Limitation
Only up to **20 arguments** are supported.
## Author
Yusuke Hosonuma / [email protected] / [@tobi462](https://twitter.com/tobi462)
## License
[Flatten](https://github.com/YusukeHosonuma/Flatten) is available under the MIT license. See the LICENSE file for more info.