扁平化实例方法参考,解决于 SE-0042。
let f: (String) -> (String) -> Bool = String.hasPrefix
// function is curried
f("Hello")("He") // => true
let __f: (String, String) -> Bool = flatten(f)
// function is flattend
__f("Hello", "He") // => true
仅支持最多 20 个参数。
Yusuke Hosonuma / tobi462@gmail.com / @tobi462
Flatten 使用 MIT 许可证。 更多信息请查看 LICENSE 文件。