Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion loop('x'){true}

Received: by 10.66.89.164 with SMTP id bp4mr8230173pab.14.1352784461719;
        Mon, 12 Nov 2012 21:27:41 -0800 (PST)
X-BeenThere: gremlin-users@googlegroups.com
Received: by 10.68.254.169 with SMTP id aj9ls27644230pbd.0.gmail; Mon, 12 Nov
 2012 21:27:40 -0800 (PST)
Received: by 10.68.141.45 with SMTP id rl13mr5918107pbb.8.1352784460104;
        Mon, 12 Nov 2012 21:27:40 -0800 (PST)
Date: Mon, 12 Nov 2012 21:27:39 -0800 (PST)
From: jstorm <infected...@gmail.com>
To: gremlin-users@googlegroups.com
Message-Id: <ad463f4e-8cb3-4b4e-b5a7-a0e3f7d03bef@googlegroups.com>
Subject: loop('x'){true}
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1772_21353466.1352784459740"

------=_Part_1772_21353466.1352784459740
Content-Type: multipart/alternative; 
	boundary="----=_Part_1773_23069008.1352784459740"

------=_Part_1773_23069008.1352784459740
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

I am just watching Marko's talk on gremlin <http://vimeo.com/26377162#at=0> and 
I am a bit confused about how the loop works.
 
I am seeing a lot of example code where the first closure (whileFunction) 
is simply true: 
g.v(1).inE('child').filter{TextAnalysis.isMean(it.thinks)}.outV.loop(3){true}
 
Since the while closure determines when the loop will be stopped, in this 
case, does this mean we will end up with an infinite loop? In other words, 
if we set the whileFunction closure to always return TRUE, will gremlin 
know when to stop, or will he just keep traversing (looping) until the end 
of time?
 
Cheers :)
 

------=_Part_1773_23069008.1352784459740
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<div>I am just watching Marko's <a href="http://vimeo.com/26377162#at=0">talk on gremlin</a>&nbsp;and I am a bit confused about how the loop works.</div><div>&nbsp;</div><div>I am seeing a lot of example code where the first closure (whileFunction) is simply true: g.v(1).inE('child').filter{TextAnalysis.isMean(it.thinks)}.outV.loop(3){true}</div><div>&nbsp;</div><div>Since the while closure determines when the loop will be stopped, in this case, does this mean we will end up with an infinite loop? In other words, if we set the whileFunction closure to always return TRUE, will gremlin know when to stop, or will he just keep traversing (looping)&nbsp;until the end of time?</div><div>&nbsp;</div><div>Cheers :)</div><div>&nbsp;</div>
------=_Part_1773_23069008.1352784459740--

------=_Part_1772_21353466.1352784459740--