Please fix this error in the documentation

25 views
Skip to first unread message

Valentin O

unread,
Aug 28, 2022, 11:46:44 PM8/28/22
to Jsonnet

The if and for components can be freely mixed. It almost always makes sense to put conditions as early as possible – this way unnecessary iterations of subsequent for components will be avoided.

   [x, y] 
   for x in std.range(1, 10) 
   if x % 3 == 0 
   for y in std.range(1, 10), ⬅ No need for comma at the end of the clause here
   if y % 2 == 0 
]

Dave Cunningham

unread,
Aug 30, 2022, 8:55:43 AM8/30/22
to Valentin O, Jsonnet
Done, thanks

--
You received this message because you are subscribed to the Google Groups "Jsonnet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jsonnet+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jsonnet/e62dbb11-6ce2-4dfb-bc5b-2e4eda9b0d11n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages