Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
gop / usr / lib / gop / parser / _testdata / listcompr / listcompr.gop
Size: Mime:
y := [x*x for x <- [1]]
println(y)

y = [x*x for x <- [1, 3, 5, 7, 11] if x > 3]
println(y)

z := [i+v for i, v <- [1, 3, 5, 7, 11] if t := i % 2; t == 1]
println(z)

println([k+","+s for k, s <- {"Hello": "xsw", "Hi": "Go+"}])

arr := [1, 2, 3, 4, 5, 6]
x := [[a, b] for a <- arr if a < b for b <- arr if b > 2]
println("x:", x)