Rename `promap`
See original GitHub issueHi there. Would you please consider renaming the promap
method to lens
(or something like this)?
This implementation of promap
does not appear to unify with the type signature for the promap
operation specified in Fantasy-Land (or more generally with how profunctors are specified in other languages). The expected signature is p a b ~> (a' -> a, b -> b') -> p a' b'
, which does not line up in terms of arity with:
const celsiusProf = appProf.promap(
state => fToC(state.fahrenheit),
(celsius, state) => ({ ...state, fahrenheit: cToF(celsius) })
);
AFAICT this is a concrete getter setter lens being passed into a method that applies it to state
and setState
.
While there is a way to utilize a profunctor lens for the same purpose, to do this you have to lawfully implement promap
, and then use a profunctor lens to transform a value of the lawful profunctor type.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:10 (7 by maintainers)
Top Results From Across the Web
To organise files and folders - Promap Help
Move files from one folder to another. Create subfolders to organise your saved files more efficiently. Delete files and folders. Rename files and...
Read more >Nintex Promapp - Changing the Name of the Standard Variation
You can change the name of the Standard across all Variation Processes by updating the Custom Standard Variation Label in Admin > Configure ......
Read more >Make a layout—ArcGIS Pro | Documentation
It will be easier to tell them apart if you rename them. In the Contents pane, with Map Frame 1 selected, click the...
Read more >How to change the name of a layer in the Layout legend?
Is it possible to change the name of a LAYER and the ITEM in the ... the layer and adding a custom symbology...
Read more >Promap 4 User Guide - Landmark Information Group
Promap gives you instant, online access to nine different layers of large and small scale digital maps. ... You can move, delete and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep, the expanded definition is super easy to write
The type
Lens_<-, ->
does not support an instance ofProfunctor
(although it’s probably a profunctor between a different set of categories), if that’s what you’re trying to figure out.The type
Lens
is contravariant inS
andB
, and covariant inA
andT
. Once you setS
andA
to be the same type you can’t really contravariantly mapA
and likewise you can’t covariantly mapB
.