Reference

min includes a small but powerful standard library organized into the following modules:

lang Module
Defines the basic language constructs, such as control flow, type conversions, symbol definition and binding, exception handling, etc.
stack Module
Defines combinators and stack-shufflers like dip, dup, swap, cons, etc.
seq Module
Defines operators for quotations, like map, filter, reduce, etc.
dict Module
Defines operators for dictionaries, like dget, ddup, dset, etc.
io Module
Provides operators for reading and writing files as well as printing to STDOUT and reading from STDIN.
fs Module
Provides operators for accessing file information and properties.
logic Module
Provides comparison operators for all min data types and other boolean logic operators.
str Module
Provides operators to perform operations on strings, use regular expressions, interpolation, etc..
sys Module
Provides operators to use as basic shell commands, access environment variables, and execute external commands.
num Module
Provides operators to perform simple mathematical operations on integer and floating point numbers.
time Module
Provides a few basic operators to manage dates, times, and timestamps.
crypto Module
Provides operators to compute hashes (MD5, SHA1, SHA224, SHA256, SHA384, sha512), base64 encoding/decoding, and AES encryption/decryption.
math Module
Provides many mathematical operators and constants such as trigonometric functions, square root, logarithms, etc.
net Module
Provides basic supports for sockets (some features are not supported on Windows systems).
http Module
Provides operators to perform HTTP requests, download files and create basic HTTP servers.

Notation

The following notation is used in the signature of all min operators:

Types and Values

No value.
a
A value of any type.
bool
A boolean value
int
An integer value.
float
A float value.
num
A numeric (integer or float) value.
string
A string value.
'sym
A string-like value (string or quoted symbol).
quot
A quotation (also expressed as parenthesis enclosing other values).
dict
A dictionary value.
dict:timeinfo

A timeinfo dictionary:

{
 2017 :year
 7 :month
 8 :day
 6 :weekday
 188 :yearday
 15 :hour
 16 :minute
 25 :second
 true :dst
 -3600 :timezone
 ;timeinfo
}
dict:error

An error dictionary:

{
 "MyError" :error
 "An error occurred" :message
 "symbol1" :symbol
 "dir1/file1.min" :filename
 3 :line
 13 :column
 ;error
}
dict:socket

A socket dictionary that must be created through the socket operator:

{
 "ipv4" :domain
 "stream" :type
 "tcp" :protocol
 ;socket
}
request

A request dictionary, representing an HTTP request to be performed through the operators exposed by the http Module:

{
 "http://httpbin.org/put" :url
 "PUT" :method
 "1.1" :version         ;optional
 "h3rald.com" :hostname ;optional
 {                      
  "it-id" :Accept-Language
  "httpbin.org" :Host
 } :headers             ;optional
 "test body" :body      ;optional
}
response

A response dictionary, representing an HTTP response returned by some of the operators exposed by the http Module:

{
  "1.1" :version ;optional
  200 :status    ;optional
  {
    "application/json" :Content-Type
  } :headers     ;optional
  "{\"test\": \"This is a test\"}" :body
}
true
true (boolean type).
false
false (boolean type)

Suffixes

The following suffixes can be placed at the end of a value or type to indicate ordering or quantities.

1
The first value of the specified type.
2
The second value of the specified type.
3
The third value of the specified type.
4
The fourth value of the specified type.
?
Zero or one.
*
Zero or more.
+
One or more