[ https://issues.apache.org/jira/browse/TINKERPOP-2978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17778732#comment-17778732 ]
ASF GitHub Bot commented on TINKERPOP-2978: ------------------------------------------- vkagamlyk commented on code in PR #2302: URL: https://github.com/apache/tinkerpop/pull/2302#discussion_r1368944918 ########## docs/src/reference/the-traversal.asciidoc: ########## @@ -3759,12 +3885,14 @@ link:++https://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gre [[reverse-step]] === Reverse Step -The `reverse()`-step (*map*) returns a reversed string of the incoming string traverser. Null values are not processed and remain -as null when returned. If the incoming traverser is a non-String value then an `IllegalArgumentException` will be thrown. +The `reverse()`-step (*map*) returns a reversed of the incoming list traverser. Single values (including null) are not +processed and are added back to the Traversal Stream unchanged. If the incoming traverser is a String value then the +reversed String will be returned. [gremlin-groovy,modern] ---- g.V().values("name").reverse() +g.V().values("name").fold().reverse() Review Comment: good to add <1>/<2> and explain difference > Add List Manipulation Steps to Gremlin > -------------------------------------- > > Key: TINKERPOP-2978 > URL: https://issues.apache.org/jira/browse/TINKERPOP-2978 > Project: TinkerPop > Issue Type: Improvement > Components: language > Reporter: Cole Greer > Priority: Major > > Today Gremlin requires that users fall back to closures to handle many common > list manipulation options that users want to do on data in the graph. This > is a problem for many users as many of the providers prevent the use of > closures due to the security risks so for these users there is no way to > manipulate lists directly. > A full list of proposed functions and semantics is detailed here: > https://github.com/apache/tinkerpop/blob/3.7.0/docs/src/dev/future/proposal-3-remove-closures.asciidoc -- This message was sent by Atlassian Jira (v8.20.10#820010)