Skip to content
This repository has been archived by the owner on Jul 25, 2018. It is now read-only.

adds fromArray #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

stoeffel
Copy link
Member

This adds Lens/PartialLens.fromArray. It works with arrayLens and objectLens.

objectLens('location').andThen(objectLens('numbers')).andThen(arrayLens(0))
// ===
Lens.fromArray(['location', 'numbers', 0])

How do you like it? Do you want me to change anything?

refs #2

@SimonRichardson
Copy link
Member

I'm in the process of moving to profunctor lenses, but I've got a lot to do on them. Unsure if we should move on this one?

@stoeffel
Copy link
Member Author

hmm.. If you plan on moving towards profunctor lenses as a replacement for the current implementation, then I wouldn't move on this one.
Did you see https://github.com/flunc/optics? I'm interested to see your implementation.

@SimonRichardson
Copy link
Member

It's almost identical to that one (because it's a port of the purescript
library), but I've moved out a lot of it to libraries. Hence the fantasy
monoid library ;-)

On Wed, 17 Feb 2016, 19:38 Christoph Hermann [email protected]
wrote:

hmm.. If you plan on moving towards profunctor lenses as a replacement for
the current implementation, then I wouldn't move on this one.
Did you see https://github.com/flunc/optics? I'm interested to see your
implementation.


Reply to this email directly or view it on GitHub
#5 (comment)
.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants