Zulip Chat Archive

Stream: batteries

Topic: List.rotate vs List.rotateLeft


Eric Wieser (May 06 2024 at 10:47):

Presumably the former should be dropped from Std, as it exists with the longer name in core?

import Std
#eval List.rotate [1, 2, 3, 4] 1 = List.rotateLeft [1, 2, 3, 4] 1 -- true

(docs#List.rotateLeft, docs#List.rotate)

Mario Carneiro (May 06 2024 at 11:13):

There is also List.rotate' which is "the same as List.rotate but slower", by which I assume it means the same but with better (or at least different) defeqs

Eric Wieser (May 06 2024 at 11:50):

I assume that csimp should be used here then?


Last updated: May 02 2025 at 03:31 UTC