sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Foldable.LawSourceLaw notes the laws that should be obeyed by any instantiation of Foldable in the form of predicates that should hold true for any arguments of the appropriate type.
You can use the alg_structs_qcheck package to generate property based tests of these laws for new modules satisfying this interface.
fold_right f init t is true when
F.fold_right ~f ~init t = (F.fold_map ~m ~f t) initwhere init has type a and m is the Endo monoid over functions of type a -> a.
fold_left f init t is true when
F.fold_right ~f ~init t = (F.fold_map ~m ~f:(Fun.flip f) t) initwhere init has type a and m is the Dual of the Endo monoid over functions of type a -> a.
fold (module M) t is true when
F.fold (module M) t = F.fold_map ~m:(module M) ~f:Fun.id t