From 7000f47b60b3fbdf90e2db12a363bbd1b2236b53 Mon Sep 17 00:00:00 2001 From: brian Date: Sun, 3 Dec 2023 21:54:01 -0800 Subject: add template for ocaml --- bin/main.ml | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 bin/main.ml (limited to 'bin/main.ml') diff --git a/bin/main.ml b/bin/main.ml new file mode 100644 index 0000000..8e36c28 --- /dev/null +++ b/bin/main.ml @@ -0,0 +1,41 @@ +open Aoc +open Utils + +let () = + let args = Sys.argv in + let day = args.(1) in + let input_file = Printf.sprintf "inputs/%s.in" day in + if not @@ Caml.Sys.file_exists input_file then + download_input day input_file ; + let file = In_channel.open_text input_file in + let inputs = In_channel.input_all file in + let (module Day : Day.S) = + match day with + | "1" -> (module Day1) + | "2" -> (module Day2) + | "3" -> (module Day3) + | "4" -> (module Day4) + | "5" -> (module Day5) + | "6" -> (module Day6) + | "7" -> (module Day7) + | "8" -> (module Day8) + | "9" -> (module Day9) + | "10" -> (module Day10) + | "11" -> (module Day11) + | "12" -> (module Day12) + | "13" -> (module Day13) + | "14" -> (module Day14) + | "15" -> (module Day15) + | "16" -> (module Day16) + | "17" -> (module Day17) + | "18" -> (module Day18) + | "19" -> (module Day19) + | "20" -> (module Day20) + | "21" -> (module Day21) + | "22" -> (module Day22) + | "23" -> (module Day23) + | "24" -> (module Day24) + | "25" -> (module Day25) + | _ -> failwith "invalid day" + in + Day.run inputs ; In_channel.close file -- cgit 1.4.1-2-gfad0 ct.html?h=v1.1.0&id=ef0157ff37404cf757f57711c62bb352a2971fa6'>commit diff stats
path: root/doc/pydoc/ranger.fsobject.fsobject.html
blob: 869ecfbef7363442bc7074733a53a3e24507737b (plain) (blame)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223