úÎ($ˆ8      !"#$%&'()*+,-./01234567 Safe-Infered89:89:portable experimentalEdward Kmett <ekmett@gmail.com> Safe-Infered 7Compressed paths using skew binary random access lists mapHom fJ assumes that f is a monoid homomorphism, that is to say, you must ensure ' f a `mappend` f b = f (a `mappend` b)  f mempty = mempty The empty path O(1) O(1) O(1)1 Invariant: most operations assume that the keys k are globally unique O(log (h - k)) to keep k elements of path of height h9, and provide a monoidal summary of the dropped elements O(log (h - k)) to keep k elements of path of height h O(log k) to drop k elements from a path O(log k) to drop kM elements from a path and provide a monoidal summary of the dropped elements O(1)4 Compare to see if two trees have the same leaf key O(log h)1 Compute the lowest common ancestor of two paths O(log h)j Compute the lowest common ancestor of two paths along with a monoidal summary of their respective tails.  ;<     ;<portable experimentalEdward Kmett <ekmett@gmail.com> Safe-InferedThe empty path O(1) O(1) !O(1)1 Invariant: most operations assume that the keys k are globally unique $O(h - k) to keep k elements of path of height h %O(k) to drop k elements from a path 'O(1)4 Compare to see if two trees have the same leaf key (O(h)$ Compute the lowest common ancestor  !"#$%&'(=>? !"#$%&'(!"# &($%' !"#$%&'(=>?portable experimentalEdward Kmett <ekmett@gmail.com> Safe-Infered )7Compressed paths using skew binary random access lists -The empty path .O(1) /O(1) 0O(1)1 Invariant: most operations assume that the keys k are globally unique 1O(1) 2O(1) 3O(log (h - k)) to keep k elements of path of height h 4O(log k) to drop k elements from a path 5O(log h) xs 5 ys holds when xs* is a prefix starting at the root of path ys. 6O(1)4 Compare to see if two trees have the same leaf key 7O(log h)$ Compute the lowest common ancestor )*+,-./01234567@ABCDE)*+,-./01234567)7-012/.534,*+6)*+,-./01234567@ABCDEF        !"#$"%$"%&#'(lca-0.2 Data.LCA.ViewData.LCA.Online.MonoidalData.LCA.Online.NaiveData.LCA.OnlineViewNodeRootPathmeasuremap mapWithKeymapHomtoListfromListtraverseWithKeytraverseemptylengthnullconsunconsviewmkeepkeepdropmdrop isAncestorOf~=lcamlca$fTraversableView$fFoldableView $fFunctorView$fFoldablePath$fFoldableTree$fTraversablePath $fFunctorPath$fTraversableTree $fFunctorTree