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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
[
  {
    "title": "Boolean operations & branching",
    "functions": [
      {
        "name": "and",
        "arguments": ["a", "b", "*n"],
        "returns": "T",
        "help": "Perform boolean AND operation on two or more values."
      },
      {
        "name": "if",
        "arguments": ["cond", "then", "else?"],
        "returns": "T",
        "help": "Evaluate condition and switch to correct branch."
      },
      {
        "name": "unless",
        "arguments": ["cond", "then", "else?"],
        "returns": "T",
        "help": "Shorthand for `if(not(cond), then, else?)`"
      },
      {
        "name": "not",
        "arguments": ["a"],
        "returns": "bool",
        "help": "Perform boolean NOT operation."
      },
      {
        "name": "or",
        "arguments": ["a", "b", "*n"],
        "returns": "T",
        "help": "Perform boolean OR operation on two or more values."
      },
      {
        "name": "try",
        "arguments": ["T"],
        "returns": "T",
        "help": "Attempt to evaluate given expression and return null if it raised an error."
      }
    ]
  },
  {
    "title": "Comparison",
    "functions": [
      {
        "name": "eq",
        "arguments": ["s1", "s2"],
        "returns": "bool",
        "help": "Test string or list equality."
      },
      {
        "name": "ne",
        "arguments": ["s1", "s2"],
        "returns": "bool",
        "help": "Test string or list inequality."
      },
      {
        "name": "gt",
        "arguments": ["s1", "s2"],
        "returns": "bool",
        "help": "Test string or list s1 > s2."
      },
      {
        "name": "ge",
        "arguments": ["s1", "s2"],
        "returns": "bool",
        "help": "Test string or list s1 >= s2."
      },
      {
        "name": "lt",
        "arguments": ["s1", "s2"],
        "returns": "bool",
        "help": "Test string or list s1 < s2."
      },
      {
        "name": "le",
        "arguments": ["s1", "s2"],
        "returns": "bool",
        "help": "Test string or list s1 <= s2."
      }
    ]
  },
  {
    "title": "Arithmetics",
    "functions": [
      {
        "name": "abs",
        "arguments": ["x"],
        "returns": "number",
        "help": "Return absolute value of number."
      },
      {
        "name": "add",
        "arguments": ["x", "y", "*n"],
        "returns": "number",
        "help": "Add two or more numbers."
      },
      {
        "name": "argmax",
        "arguments": ["numbers", "labels?"],
        "returns": "any",
        "help": "Return the index or label of the largest number in the list."
      },
      {
        "name": "argmin",
        "arguments": ["numbers", "labels?"],
        "returns": "any",
        "help": "Return the index or label of the smallest number in the list."
      },
      {
        "name": "ceil",
        "arguments": ["x", "unit?"],
        "returns": "number",
        "help": "Return the smallest integer greater than or equal to x. Optionally ceil to nearest given unit."
      },
      {
        "name": "div",
        "arguments": ["x", "y", "*n"],
        "returns": "number",
        "help": "Divide two or more numbers."
      },
      {
        "name": "idiv",
        "arguments": ["x", "y"],
        "returns": "number",
        "help": "Integer division of two numbers."
      },
      {
        "name": "int",
        "arguments": ["any"],
        "returns": "int",
        "help": "Cast value as int and raise an error if impossible."
      },
      {
        "name": "float",
        "arguments": ["any"],
        "returns": "float",
        "help": "Cast value as float and raise an error if impossible."
      },
      {
        "name": "floor",
        "arguments": ["x", "unit?"],
        "returns": "number",
        "help": "Return the smallest integer lower than or equal to x. Optionally floor to nearest given unit."
      },
      {
        "name": "log",
        "arguments": ["x", "base?"],
        "returns": "number",
        "help": "Return the natural or custom base logarithm of x."
      },
      {
        "name": "log2",
        "arguments": ["x"],
        "returns": "number",
        "help": "Return the base 2 logarithm of x."
      },
      {
        "name": "log10",
        "arguments": ["x"],
        "returns": "number",
        "help": "Return the base 10 logarithm of x."
      },
      {
        "name": "max",
        "arguments": ["x", "y", "*n"],
        "alternatives": [["list_of_numbers"]],
        "returns": "number",
        "help": "Return the maximum number."
      },
      {
        "name": "min",
        "arguments": ["x", "y", "*n"],
        "alternatives": [["list_of_numbers"]],
        "returns": "number",
        "help": "Return the minimum number."
      },
      {
        "name": "mod",
        "arguments": ["x", "y"],
        "returns": "number",
        "help": "Return the remainder of x divided by y."
      },
      {
        "name": "mul",
        "arguments": ["x", "y", "*n"],
        "returns": "number",
        "help": "Multiply two or more numbers."
      },
      {
        "name": "neg",
        "arguments": ["x"],
        "returns": "number",
        "help": "Return -x."
      },
      {
        "name": "pow",
        "arguments": ["x", "y"],
        "returns": "number",
        "help": "Raise x to the power of y."
      },
      {
        "name": "round",
        "arguments": ["x", "unit?"],
        "returns": "number",
        "help": "Return x rounded to the nearest integer. Optionally round to nearest given unit."
      },
      {
        "name": "sqrt",
        "arguments": ["x"],
        "returns": "number",
        "help": "Return the square root of x."
      },
      {
        "name": "sub",
        "arguments": ["x", "y", "*n"],
        "returns": "number",
        "help": "Subtract two or more numbers."
      },
      {
        "name": "trunc",
        "arguments": ["x", "unit?"],
        "returns": "number",
        "help": "Truncate the number by removing its decimal part. Optionally trunc to nearest given unit."
      }
    ]
  },
  {
    "title": "Formatting",
    "functions": [
      {
        "name": "bytesize",
        "arguments": ["string"],
        "returns": "string",
        "help": "Return a number of bytes in human-readable format (KB, MB, GB, etc.)."
      },
      {
        "name": "escape_regex",
        "arguments": ["string"],
        "returns": "string",
        "help": "Escape a string so it can be used safely in a regular expression."
      },
      {
        "name": "fmt",
        "arguments": ["string", "*arguments"],
        "alternatives": [["string", "map"]],
        "returns": "string",
        "help": "Format a string by replacing \"{}\" occurrences by subsequent arguments.\n\nExample: `fmt(\"Hello {} {}\", name, surname)` will replace the first \"{}\" by the value of the name column, then the second one by the value of the surname column.\n\nCan also be given a substitution map like so:\n`fmt(\"Hello {name}\", {name: \"John\"})`."
      },
      {
        "name": "lower",
        "arguments": ["string"],
        "returns": "string",
        "help": "Lowercase string."
      },
      {
        "name": "pad",
        "arguments": ["string", "width", "char?"],
        "returns": "string",
        "help": "Pad given string with spaces or given character so that it is least given width."
      },
      {
        "name": "lpad",
        "arguments": ["string", "width", "char?"],
        "returns": "string",
        "help": "Left pad given string with spaces or given character so that it is least given width."
      },
      {
        "name": "rpad",
        "arguments": ["string", "width", "char?"],
        "returns": "string",
        "help": "Right pad given string with spaces or given character so that it is least given width."
      },
      {
        "name": "printf",
        "arguments": ["format", "*arguments"],
        "returns": "string",
        "help": "Apply printf formatting with given format and arguments. Arguments can also be provided as a list.\nFor instance: `split('John Landy') | printf('first: %s, last: %s', _)`"
      },
      {
        "name": "numfmt",
        "arguments": ["number", "thousands_sep=\",\"", "comma=false", "significance=5"],
        "returns": "string",
        "help": "Format a number with thousands separator and proper significance."
      },
      {
        "name": "trim",
        "arguments": ["string", "chars?"],
        "returns": "string",
        "help": "Trim string of leading & trailing whitespace or provided characters."
      },
      {
        "name": "to_fixed",
        "arguments": ["number", "precision"],
        "returns": "string",
        "help": "Format given number using fixed point notation with specified number of decimal places."
      },
      {
        "name": "ltrim",
        "arguments": ["string", "chars?"],
        "returns": "string",
        "help": "Trim string of leading whitespace or provided characters."
      },
      {
        "name": "rtrim",
        "arguments": ["string", "chars?"],
        "returns": "string",
        "help": "Trim string of trailing whitespace or provided characters."
      },
      {
        "name": "upper",
        "arguments": ["string"],
        "returns": "string",
        "help": "Uppercase string."
      }
    ]
  },
  {
    "title": "Strings",
    "functions": [
      {
        "name": "count",
        "arguments": ["string", "substring"],
        "alternatives": [
          ["string", "regex"]
        ],
        "returns": "int",
        "help": "Count number of times substring appear in string. Or count the number of times a regex pattern matched the strings. Note that only non-overlapping matches will be counted in both cases. Remember a regex pattern must be written with slashes e.g. `/france|french/i`."
      },
      {
        "name": "endswith",
        "arguments": ["string", "substring"],
        "returns": "bool",
        "help": "Test if string ends with substring."
      },
      {
        "name": "match",
        "arguments": ["string", "regex", "group"],
        "returns": "string",
        "help": "Return a regex pattern match on the string.  Remember a regex pattern must be written with slashes e.g. `/france|french/i`."
      },
      {
        "name": "replace",
        "arguments": ["string", "substring", "replacement"],
        "alternatives": [
          ["string", "regex", "replacement"]
        ],
        "returns": "string",
        "help": "Replace all non-overlapping occurrences of substring in given string with provided replacement. Can also replace regex pattern matches. Remember a regex pattern must be written with slashes e.g. `/france|french/i`.\n\nSee regex replacement string syntax documentation here:\nhttps://docs.rs/regex/latest/regex/struct.Regex.html#replacement-string-syntax"
      },
      {
        "name": "split",
        "arguments": ["string", "substring", "max?"],
        "alternatives": [
          ["string", "regex", "max?"]
        ],
        "returns": "list",
        "help": "Split a string by a given separator substring. Can also split using a regex pattern. Remember a regex pattern must be written with slashes e.g. `/france|french/i`."
      },
      {
        "name": "startswith",
        "arguments": ["string", "substring"],
        "returns": "bool",
        "help": "Test if string starts with substring."
      }
    ]
  },
  {
    "title": "Strings, lists and maps",
    "functions": [
      {
        "name": "concat",
        "arguments": ["string", "*strings"],
        "returns": "string",
        "help": "Concatenate given strings into a single one."
      },
      {
        "name": "contains",
        "arguments": ["string", "substring"],
        "alternatives": [
          ["string", "regex"],
          ["list", "item"],
          ["map", "key"]
        ],
        "returns": "bool",
        "help": "If target is a string: return whether substring can be found in it or return whether given regular expression matched.\n\nIf target is a list, returns whether given item was found in it.\n\nIf target is a map, returns whether given key was found in it."
      },
      {
        "name": "first",
        "arguments": ["seq"],
        "returns": "T",
        "help": "Get first char of string or first item of list."
      },
      {
        "name": "last",
        "arguments": ["seq"],
        "returns": "T",
        "help": "Get last char of string or first item of list."
      },
      {
        "name": "len",
        "arguments": ["seq"],
        "returns": "int",
        "help": "Get number of chars in string or number of items in list."
      },
      {
        "name": "get",
        "arguments": ["string", "index", "default?"],
        "alternatives": [
          ["list", "index", "default?"],
          ["map", "key", "default?"]
        ],
        "returns": "any",
        "help": "If target is a string, return the nth unicode char. If target is a list, return the nth item. Indices are zero-based and can be negative to access items in reverse. If target is a map, return the value associated with given key. All variants can also take a default value when desired item is not found."
      },
      {
        "name": "slice",
        "arguments": ["seq", "start", "end?"],
        "returns": "seq",
        "help": "Return slice of string or list."
      }
    ]
  },
  {
    "title": "Lists",
    "functions": [
      {
        "name": "all",
        "arguments": ["list", "lambda"],
        "returns": "bool",
        "help": "Returns whether the given lambda returned true for all elements of the list.\nFor instance: `all(names, name.startswith('A'))`"
      },
      {
        "name": "any",
        "arguments": ["list", "lambda"],
        "returns": "bool",
        "help": "Returns whether the given lambda returned true for any element of the list.\nFor instance: `any(names, name.startswith('A'))`"
      },
      {
        "name": "compact",
        "arguments": ["list"],
        "returns": "list",
        "help": "Drop all falsey values from given list."
      },
      {
        "name": "filter",
        "arguments": ["list", "lambda"],
        "returns": "list",
        "help": "Return a list containing only elements for which given lambda returned true.\nFor instance: `filter(names, name => name.startswith('A'))`"
      },
      {
        "name": "find",
        "arguments": ["list", "lambda"],
        "returns": "any?",
        "help": "Return the first item of a list for which given lambda returned true.\nFor instance: `find(names, name => name.startswith('A'))`"
      },
      {
        "name": "find_index",
        "arguments": ["list", "lambda"],
        "returns": "int?",
        "help": "Return the index of the first item of a list for which given lambda returned true.\nFor instance: `find_index(names, name => name.startswith('A'))`"
      },
      {
        "name": "index_by",
        "arguments": ["list", "key"],
        "returns": "map",
        "help": "Take a list of maps and a key name and return an indexed map from selected keys to the original maps."
      },
      {
        "name": "join",
        "arguments": ["list", "sep"],
        "returns": "string",
        "help": "Join list by separator."
      },
      {
        "name": "map",
        "arguments": ["list", "lambda"],
        "returns": "list",
        "help": "Return a list with elements transformed by given lambda.\nFor instance: `map(numbers, n => n + 3)`"
      },
      {
        "name": "mean",
        "arguments": ["numbers"],
        "returns": "number?",
        "help": "Return the mean of the given numbers."
      },
      {
        "name": "sum",
        "arguments": ["numbers"],
        "returns": "number?",
        "help": "Return the sum of the given numbers, or nothing if the sum overflowed."
      }
    ]
  },
  {
    "title": "Maps",
    "functions": [
      {
        "name": "keys",
        "arguments": ["map"],
        "returns": "[string]",
        "help": "Return a list of the map's keys."
      },
      {
        "name": "values",
        "arguments": ["map"],
        "returns": "[T]",
        "help": "Return a list of the map's values."
      }
    ]
  },
  {
    "title": "Dates & time",
    "functions": [
      {
        "name": "datetime",
        "arguments": ["string", "format=?", "timezone=?"],
        "returns": "datetime",
        "help": "Parse a string as a datetime according to format and timezone. If no format is provided, string is parsed as ISO 8601 date format. Default timezone is the system timezone.\nhttps://docs.rs/jiff/latest/jiff/fmt/strtime/index.html#conversion-specifications"
      },
      {
        "name": "earliest",
        "arguments": ["datetime1", "datetime2", "*datetimen"],
        "alternatives": [["list_of_datetimes"]],
        "returns": "datetime",
        "help": "Return the earliest datetime."
      },
      {
        "name": "latest",
        "arguments": ["datetime1", "datetime2", "*datetimen"],
        "alternatives": [["list_of_datetimes"]],
        "returns": "datetime",
        "help": "Return the latest datetime."
      },
      {
        "name": "strftime",
        "arguments": ["target", "format"],
        "returns": "string",
        "help": "Format target (a time in ISO 8601 format, or the result of datetime() function) according to format."
      },
      {
        "name": "timestamp",
        "arguments": ["number"],
        "returns": "datetime",
        "help": "Parse a number as a POSIX timestamp in seconds (nb of seconds since 1970-01-01 00:00:00 UTC), and convert it to a datetime in local time."
      },
      {
        "name": "timestamp_ms",
        "arguments": ["number"],
        "returns": "datetime",
        "help": "Parse a number as a POSIX timestamp in milliseconds (nb of milliseconds since 1970-01-01 00:00:00 UTC), and convert it to a datetime in local time."
      },
      {
        "name": "to_timezone",
        "arguments": ["target", "timezone_in", "timezone_out"],
        "returns": "datetime",
        "help": "Parse target (a time in ISO 8601 format, or the result of datetime() function) in timezone_in, and convert it to timezone_out."
      },
      {
        "name": "to_local_timezone",
        "arguments": ["target"],
        "returns": "datetime",
        "help": "Parse target (a time in ISO 8601 format, or the result of datetime() function) in timezone_in, and convert it to the system's local timezone."
      },
      {
        "name": "year_month_day",
        "aliases": ["ymd"],
        "arguments": ["target"],
        "returns": "string",
        "help": "Extract the year, month and day of a datetime. If the input is a string, first parse it into datetime, and then extract the year, month and day.\nEquivalent to `strftime(string, format=\"%Y-%m-%d\")`."
      },
      {
        "name": "month_day",
        "arguments": ["target"],
        "returns": "string",
        "help": "Extract the month and day of a datetime. If the input is a string, first parse it into datetime, and then extract the month and day.\nEquivalent to `strftime(string, format=\"%m-%d\")`."
      },
      {
        "name": "month",
        "arguments": ["target"],
        "returns": "string",
        "help": "Extract the month of a datetime. If the input is a string, first parse it into datetime, and then extract the month.\nEquivalent to `strftime(string, format=\"%m\")`."
      },
      {
        "name": "year",
        "arguments": ["target"],
        "returns": "string",
        "help": "Extract the year of a datetime. If the input is a string, first parse it into datetime, and then extract the year.\nEquivalent to `strftime(string, format=\"%Y\")`."
      },
      {
        "name": "year_month",
        "aliases": ["ym"],
        "arguments": ["target"],
        "returns": "string",
        "help": "Extract the year and month of a datetime. If the input is a string, first parse it into datetime, and then extract the year and month.\nEquivalent to `strftime(string, format=\"%Y-%m\")`."
      }
    ]
  },
  {
    "title": "Urls & web-related",
    "functions": [
      {
        "name": "html_unescape",
        "arguments": ["string"],
        "returns": "string",
        "help": "Unescape given HTML string by converting HTML entities back to normal text."
      },
      {
        "name": "lru",
        "arguments": ["string"],
        "returns": "string",
        "help": "Convert the given URL to LRU format.\nFor more info, read this: https://github.com/medialab/ural#about-lrus"
      },
      {
        "name": "mime_ext",
        "arguments": ["string"],
        "returns": "string",
        "help": "Return the extension related to given mime type."
      },
      {
        "name": "parse_dataurl",
        "arguments": ["string"],
        "returns": "[string, bytes]",
        "help": "Parse the given data url and return its mime type and decoded binary data."
      },
      {
        "name": "urljoin",
        "arguments": ["string", "string"],
        "returns": "string",
        "help": "Join an url with the given addendum."
      }
    ]
  },
  {
    "title": "Fuzzy matching & information retrieval",
    "functions": [
      {
        "name": "fingerprint",
        "arguments": ["string"],
        "returns": "string",
        "help": "Fingerprint a string by normalizing characters, re-ordering and deduplicating its word tokens before re-joining them by spaces."
      },
      {
        "name": "soundex",
        "arguments": ["name"],
        "returns": "string",
        "help": "Compute the SOUNDEX code (a phonetic encoding) of given name."
      },
      {
        "name": "refined_soundex",
        "arguments": ["name"],
        "returns": "string",
        "help": "Compute the refined SOUNDEX code (a phonetic encoding) of given name."
      },
      {
        "name": "phonogram",
        "arguments": ["name"],
        "returns": "string",
        "help": "Compute the \"phonogram\" code (yomguithereal's own phonetic encoding) of given name."
      },
      {
        "name": "carry_stemmer",
        "arguments": ["string"],
        "returns": "string",
        "help": "Apply the \"Carry\" stemmer targeting the French language."
      },
      {
        "name": "s_stemmer",
        "arguments": ["string"],
        "returns": "string",
        "help": "Apply a very simple stemmer removing common plural inflexions in some languages."
      },
      {
        "name": "unidecode",
        "arguments": ["string"],
        "returns": "string",
        "help": "Convert string to ascii as well as possible."
      }
    ]
  },
  {
    "title": "Utils",
    "functions": [
      {
        "name": "col",
        "arguments": ["name_or_pos", "nth?"],
        "returns": "bytes",
        "help": "Return value of cell for given column, by name, by position or by name & nth, in case of duplicate header names."
      },
      {
        "name": "col?",
        "arguments": ["name_or_pos", "nth?"],
        "returns": "bytes",
        "help": "Return value of cell for given column, by name, by position or by name & nth, in case of duplicate header names. Allow selecting inexisting columns, in which case it will return null."
      },
      {
        "name": "header",
        "arguments": ["name_or_pos", "nth?"],
        "returns": "bytes",
        "help": "Return header name for given column, by name, by position or by name & nth, in case of duplicate header names."
      },
      {
        "name": "header?",
        "arguments": ["name_or_pos", "nth?"],
        "returns": "bytes",
        "help": "Return header namefor given column, by name, by position or by name & nth, in case of duplicate header names. Allow selecting inexisting columns, in which case it will return null."
      },
      {
        "name": "col_index",
        "arguments": ["name_or_pos", "nth?"],
        "returns": "bytes",
        "help": "Return zero-based index of given column, by name, by position or by name & nth, in case of duplicate header names."
      },
      {
        "name": "col_index?",
        "arguments": ["name_or_pos", "nth?"],
        "returns": "bytes",
        "help": "Return zero-based index of given column, by name, by position or by name & nth, in case of duplicate header names. Allow selecting inexisting columns, in which case it will return null."
      },
      {
        "name": "cols",
        "arguments": ["from_name_or_pos?", "to_name_or_pos?"],
        "returns": "list[bytes]",
        "help": "Return list of cell values from the given column by name or position to another given column by name or position, inclusive. Can also be called with a single argument to take a slice from the given column to the end, or no argument at all to take all columns."
      },
      {
        "name": "err",
        "arguments": ["msg"],
        "returns": "error",
        "help": "Make the expression return a custom error."
      },
      {
        "name": "headers",
        "arguments": ["from_name_or_pos?", "to_name_or_pos?"],
        "returns": "list[string]",
        "help": "Return list of header names from the given column by name or position to another given column by name or position, inclusive. Can also be called with a single argument to take a slice from the given column to the end, or no argument at all to return all headers."
      },
      {
        "name": "index",
        "arguments": [],
        "returns": "int?",
        "help": "Return the row's index, if applicable."
      },
      {
        "name": "regex",
        "arguments": ["string"],
        "returns": "regex",
        "help": "Parse given string as regex. Useful when your patterns are dynamic, e.g. built from a CSV cell. Else prefer using regex literals e.g. \"/test/\"."
      },
      {
        "name": "typeof",
        "arguments": ["value"],
        "returns": "string",
        "help": "Return type of value."
      }
    ]
  },
  {
    "title": "IO & path wrangling",
    "functions": [
      {
        "name": "abspath",
        "arguments": ["string"],
        "returns": "string",
        "help": "Return absolute & canonicalized path."
      },
      {
        "name": "basename",
        "arguments": ["path", "suffix?"],
        "returns": "string",
        "help": "Return the final component of given path, usually the file name, all while stripping it of an optional suffix."
      },
      {
        "name": "cmd",
        "arguments": ["string", "list[string]"],
        "returns": "bytes",
        "help": "Run a command using the provided list of arguments as a subprocess and return the resulting bytes trimmed of trailing whitespace."
      },
      {
        "name": "copy",
        "arguments": ["source_path", "target_path"],
        "returns": "string",
        "help": "Copy a source to target path. Will create necessary directories on the way. Returns target path as a convenience."
      },
      {
        "name": "dirname",
        "arguments": ["path"],
        "returns": "string",
        "help": "Return target path without final component if any."
      },
      {
        "name": "ext",
        "arguments": ["path"],
        "returns": "string?",
        "help": "Return the path's extension, if any."
      },
      {
        "name": "filesize",
        "arguments": ["string"],
        "returns": "int",
        "help": "Return the size of given file in bytes."
      },
      {
        "name": "isfile",
        "arguments": ["string"],
        "returns": "bool",
        "help": "Return whether the given path is an existing file on disk."
      },
      {
        "name": "move",
        "arguments": ["source_path", "target_path"],
        "returns": "string",
        "help": "Move a source to target path. Will create necessary directories on the way. Returns target path as a convenience."
      },
      {
        "name": "parse_json",
        "arguments": ["string"],
        "returns": "any",
        "help": "Parse the given string as JSON."
      },
      {
        "name": "parse_py_literal",
        "arguments": ["string"],
        "returns": "any",
        "help": "Parse the given string as a python literal."
      },
      {
        "name": "pathjoin",
        "aliases": ["pjoin"],
        "arguments": ["string", "*strings"],
        "returns": "string",
        "help": "Join multiple paths correctly."
      },
      {
        "name": "read",
        "arguments": ["path", "encoding=\"utf-8\"", "errors=\"strict\""],
        "returns": "string",
        "help": "Read file at path. Default encoding is \"utf-8\". Default error handling policy is \"replace\", and can be one of \"replace\", \"ignore\" or \"strict\"."
      },
      {
        "name": "read_csv",
        "arguments": ["path"],
        "returns": "list[map]",
        "help": "Read and parse CSV file at path, returning its rows as a list of maps with headers as keys."
      },
      {
        "name": "read_json",
        "arguments": ["path"],
        "returns": "any",
        "help": "Read and parse JSON file at path."
      },
      {
        "name": "shell",
        "arguments": ["string"],
        "returns": "bytes",
        "help": "Convenience function running `cmd(\"$SHELL -c <command>\") ` on unix-like systems and `cmd(\"cmd \\C <command>\")` on Windows."
      },
      {
        "name": "shlex_split",
        "arguments": ["string"],
        "returns": "list[string]",
        "help": "Split a string of command line arguments into a proper list that can be given to e.g. the `cmd` function."
      },
      {
        "name": "write",
        "arguments": ["string", "path"],
        "returns": "string",
        "help": "Write string to path as utf-8 text. Will create necessary directories recursively before actually writing the file. Return the path that was written."
      }
    ]
  },
  {
    "title": "Randomness & hashing",
    "functions": [
      {
        "name": "md5",
        "arguments": ["string"],
        "returns": "string",
        "help": "Return the md5 hash of string in hexadecimal representation."
      },
      {
        "name": "random",
        "arguments": [],
        "returns": "float",
        "help": "Return a random float between 0 and 1."
      },
      {
        "name": "uuid",
        "arguments": [],
        "returns": "string",
        "help": "Return a uuid v4."
      }
    ]
  }
]