Debian Codegraph @

tests/indent/julia.jl

raw
1 module M
2
3 function process(items)
4 total = 0
5 for v in items
6 if v > 0
7 total += v
8 elseif v < 0
9 total -= v
10 else
11 total += 1
12 end
13 end
14 config = Dict(
15 "a" => 1,
16 "b" => 2,
17 )
18 return total
19 end
20
21 function safe(x)
22 try
23 risky(x)
24 catch e
25 handle(e)
26 finally
27 cleanup()
28 end
29 end
30
31 end