| 381 | | Then, for example: |
| | 388 | `Quasifunctor r s k u v` means that `r` and `s` have members of types `u` and `v`, in turn, both with selector `k`; thus, one can mutate the member at 'k' with an arbitrary function of type `u -> v`, and the overall function is of type `r -> s`; i.e. one can lift a function of type `u -> v` to a function of type `r -> s`. This is the record update. |
| | 389 | |
| | 390 | `qfmap` is the lifter function. The first argument serves to specify which member is meant. |
| | 391 | |
| | 392 | This ought to allow polymorphic mutation; to set member at "x" to value `x` is simply `qfmap (undefined :: "x") (const x)`, though this mechanism is of course more general; one could `qfmap` any arbitrary function, not just a constant function. |
| | 393 | |
| | 394 | For example: |