目录
目录README.md

swift-lens

The concept of functional Lenses in Swift.

Functional Lens - convenient, powerful, and safe concept for data mutation. A good Talk about Lenses in Swift from Brandon Williams highly recommended.

Operators:

* - lenses composition;
*~ - set value;
|> - piping.

Example of usage:

user = user |> User.idLens *~ newId
user = user |> (User.nameLens * Name.firstNameLens) *~ "Joel"

SPM Install

Contributing

  • Something wrong or you need anything else? Please open an issue or make a Pull Request.
  • Pull requests are welcome.

License

swift-lens is available under the MIT license. See the LICENSE file for more info.

关于
36.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号