let foo = ref [] let bar () = foo := 42 :: !foo let qux () = foo := "hello" :: !foo