aboutsummaryrefslogtreecommitdiff
path: root/examples/generated.csx
blob: 8710bd646a4e3ba8943b824d4ff02cd94f292c18 (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
[set no [fn [x] [same x []]]]
[set outint [fn [n] [if [< n 0]
  [do [out 45] [outint [neg n]]]
  [if [< n 10]
    [out [+ 48 n]]
    [do
      [outint [div n 10]]
      [out [+ 48 [mod n 10]]]
    ]
  ]
]]]
[set map [fn [f l] [if [no l] []
  [pair [f [head l]] [map f [tail l]]]
]]]
[map [fn [n] [outint n] [out 10]]
  [quote [99 37 73 42]]
]
[set id [fn args args]]
[outint [[id 42 13 31] 2]]
[out 10]
[out ["Hello!" 1]]
[out 10]
[set outstr [fn [str] [if str
  [do [out [head str]] [outstr [tail str]]]
  []
]]]
[outstr "Hello, World!"]
[out 10]