【文件属性】:
文件名称:purescript-profunctor-lenses:纯profunctor镜片
文件大小:50KB
文件格式:ZIP
更新时间:2021-05-03 21:31:04
PureScript
长焦镜头
纯profunctor镜头:一种用于在嵌套数据结构内更新,查看和设置值的机制。
了解更多有关功能镜片的信息:
中的实用Profunctor光学中Profunctor光学器件的实用介绍
,一本有关PureScript镜片的书
安装
使用安装profunctor-lenses :
spago install profunctor-lenses
快速开始
> structure = Tuple ( Tuple ( Tuple " hi! " 3 ) 2 ) 1
> import Data.Lens
> _leftmost = _1 <<< _1 <<< _1
> view _leftmost structure
" hi! "
> set _leftmost " Bye! " structure
( Tuple ( Tuple ( Tuple " Bye! " 3 ) 2 ) 1
【文件预览】:
purescript-profunctor-lenses-main
----.gitignore(79B)
----README.md(4KB)
----CHANGELOG.md(8KB)
----.github()
--------PULL_REQUEST_TEMPLATE.md(630B)
--------workflows()
--------ISSUE_TEMPLATE()
----test()
--------Main.purs(5KB)
----packages.dhall(194B)
----examples.dhall(248B)
----examples()
--------.gitignore(96B)
--------README.md(2KB)
--------src()
----LICENSE(1KB)
----bower.json(1KB)
----CONTRIBUTING.md(524B)
----src()
--------Data()
----spago.dhall(498B)
----.editorconfig(215B)