I'm implementing List.replace. Right now this is its type signature:
replace : List(item), U64, item -> Try({ list : List(item), value : item }, [OutOfBounds, ..])
I think the value field of the returned record isn't clear what it is, until you read the docs or think about the possibilities of what it could it be, after which you narrow it down to 1 thing. The previous value that was replaced. The Rust based compiler used value. I'd suggest naming it prev_value, old or old_value. What do you think, what should be the field name?
prev maybe?
That's good also
Last updated: Jun 16 2026 at 16:19 UTC