same than Sys.argv but as a list
Sys.argv
same than List.assoc but with a default value
same than List.assoc but with a custom error message
replace the associated value for the first key in an association list
init using a backup seed
cut the string at the first occurence of the char
cut the string at the last occurence of the char
char_split s c splits the string s wherever the character c appears
char_split s c
s
c
same than char_split but also String.trims all strings and filters out all empty strings
char_split
String.trim
if the difference is less or equal to epsilon_float
epsilon_float
Option.default def opt_val returns def if opt_val is None or if opt_val is Some v, then v is returned.
Option.default def opt_val
def
opt_val
None
Some v
v
ends_with sub s returns true if s ends with sub
ends_with sub s
sub
Loop.fold_left f v n calls f in a folded way over the v parameter n times.
Loop.fold_left f v n
f
n
return the extension of the filename.
List.init n f returns a list of n elements that were created by calling the function f with parameter from 0 to n-1
List.init n f
0
n-1
make possible to init with the same seed again
get all contents from an input channel
returns one line from the input channel or None if the end of file is reached
returns the list of lines from an input channel
Loop.iter f n calls f repeatedly n times.
Loop.iter f n
Loop.iteri f n calls f repeatedly n times.
Loop.iteri f n
same than input_line
input_line
same than input_lines
input_lines
returns the list of lines from a file
List.map and List.filter in one round
get the nth char of a string in an exceptionless way
String.nth_is s ofs c returns true if the nth char is c
String.nth_is s ofs c
extract one element from the list and also return the list without this element
probabilistic choice
loads the all content of the given file
read binary file in a portable way for Windows
similar to List.find but returns the result of the function application
List.find
same than List.return but exceptionless
List.return
starts_with sub s returns true if s starts with sub
starts_with sub s
takes the n-th first elements of the list
write_file filename contents