--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/183e10c4-4333-4895-8eba-53f41134e030o%40googlegroups.com.
I guess that does not handle the case where there is no result though.Kelvin
On Tuesday, June 23, 2020 at 5:03:18 PM UTC-5, Kelvin Lawrence wrote:What about this as an alternative - maybe I am missing a subtlety ?gremlin> g.V().fold().limit(local,2).choose(count(local).is(gt(1)),identity(),fold())==>[v[0],v[1]]gremlin> g.V().fold().limit(local,1).choose(count(local).is(gt(1)),identity(),fold())==>[v[0]]CheersKelvin
To unsubscribe from this group and stop receiving emails from it, send an email to gremli...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/183e10c4-4333-4895-8eba-53f41134e030o%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/a2f72fe4-beb4-47f5-b1b9-3b64baf62aabo%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/a2f72fe4-beb4-47f5-b1b9-3b64baf62aabo%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/a2f72fe4-beb4-47f5-b1b9-3b64baf62aabo%40googlegroups.com.
A few questions though, always assuming from now on that lim = 1
LimitLocal(count) => count == 1? __.choose(__.as('a').unfold().limit(1).where(eq('a')), limit(1), limit(local, 1).fold()): __.limit(local, count)Does this miss something ?
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/bb81b690-6dae-4d07-8a46-b771447afa51o%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/bb81b690-6dae-4d07-8a46-b771447afa51o%40googlegroups.com.