summaryrefslogtreecommitdiff
path: root/tests/examplefiles/scope.cirru
blob: b17ff4eaf23a61c0ce0fb0c8ea3fc97a696d3194 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

-- https://github.com/Cirru/cirru-gopher/blob/master/code/scope.cr

set a (int 2)

print (self)

set c (child)

under c
  under parent
    print a

print $ get c a

set c x (int 3)
print $ get c x

set just-print $ code
  print a

print just-print

eval (self) just-print
eval just-print

print (string "string with space")
print (string "escapes \n \"\\")

brackets ((((()))))

"eval" $ string "eval"

print (add $ (int 1) (int 2))

print $ unwrap $
  map (a $ int 1) (b $ int 2)