What is the easiest way to add an element to the end of the list?

Viewed 38637

As:: : 'a -> 'a list -> 'a list is used to add an element to the begin of a list, Could anyone tell me if there is a function to add an element to the end of a list? If not, I guess List.rev (element::(List.rev list)) is the most straightforward way to do it?

Thank you!

3 Answers
Related