On 31/05/24, Rory Campbell-Lange (r...@campbell-lange.net) wrote:
> On 23/05/24, Rory Campbell-Lange (r...@campbell-lange.net) wrote:
> > I've been playing with with rangefunc experiment...
> 
> ...reference to python nested yield example...
> 
> >     for p in people:
> >         for c in p.cars:
> >             for t in c.tickets:
> >                 print("person {} in car {} got ticket {}", p, c, t)
> > 
> 
> > [My attempt to recreate in go at]  
> > https://go.dev/play/p/gFUcKNSrbMV?v=gotip ... only has an iterator on the 
> > left hand side and series of nested structs through slices...
> 
> For info, in my attempt to use nested iter.Seq structures I (obviously) 
> didn't need a restart, but simply yielded the left-most struct and used the 
> iterators in each nested struct as required.

Apologies -- the code I meant to share for an example of nested iter.Seq 
structs is here: https://go.dev/play/p/8QZmybr_nOB?v=gotip

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/Zlnkv87IZO3q-pYk%40campbell-lange.net.

Reply via email to