Editable representable functors
Open
- Dominant language
- Haskell
- Stars
- 45
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
In general,
```haskell
ixSureDef :: (Representable f, Eq (Rep f)) => Rep f -> Lens' (f a) a
ixSureDef i f fa = (\x' -> Rep.tabulate (\k -> if k == i then x' else Rep.index fa k)) <$> f (Rep.index fa i)
```
Of course, this is horrifically inefficient. Is there a good place here for a subclass supporting such an operation? Alternatively (or additionally), is there room in lens for an `IxSure` class similar to `Ixed` but providing a `Lens` instead of a `Traversal`?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.