Zipper.agda 371 B

12345678910111213141516171819202122
  1. module Zipper where
  2. import Derivative
  3. import Functor
  4. import Sets
  5. open Functor
  6. open Derivative
  7. open Semantics
  8. open Recursive
  9. open Sets
  10. Zipper : U -> Set
  11. Zipper F = List (⟦ ∂ F ⟧ (μ F))
  12. -- Plugging a zipper
  13. unzip : {F : U} -> Zipper F -> μ F -> μ F
  14. unzip [] t = t
  15. unzip {F} (c :: γ) t = inn (plug-∂ F c (unzip γ t))