Zulip Chat Archive

Stream: Is there code for X?

Topic: renaming `List.foldr_self_append`


Kim Morrison (Aug 21 2024 at 04:06):

Any suggestions for a better name for:

List.foldr_self_append.{u_1} {α : Type u_1} {l' : List α} (l : List α) : foldr cons l' l = l ++ l'

?

Of course List.foldr_cons is already taken. :-)

Kim Morrison (Aug 21 2024 at 04:07):

There will also be theorem foldl_flip_cons (l : List α) : l.foldl (fun x y => y :: x) l' = l.reverse ++ l', which I don't mind renaming for consonance.

Daniel Weber (Aug 21 2024 at 04:10):

Perhaps List.foldr_cons_eq_append?

Eric Wieser (Aug 21 2024 at 09:56):

Or some more symbol reading, as foldr_cons_left


Last updated: May 02 2025 at 03:31 UTC