Skip to content

Core

Bool

Bytes

Construction Examples:

  • 0xC0FFEE (hex)
  • 0zSGVsbG8gV29ybGQ= (base64, = is optional)
  • bytes("Hello")
  • bytes($tx)
  • bytes(xpub661MyMwAZ92K…cotpLmSkMxrp99L)

Coercion – any function taking Bytes will also accept:

Underlying type: Vec<u8>

Rust source code: src/stdlib/mod.rs:218

String

str()

str(Any) -> String

Rust source code: src/stdlib/mod.rs:201

Int

int()

int(Int|Float|String) -> Int

Rust source code: src/stdlib/mod.rs:171

Float

float()

float(Int|Float|String) -> Float

Rust source code: src/stdlib/mod.rs:187

Array

(𝘢𝘯𝘺)

Symbol

symbol()

symbol(name: String = None) -> Symbol

Rust source code: src/stdlib/mod.rs:211

Function

General

typeof()

typeof(Any) -> String

Rust source code: src/stdlib/mod.rs:104

Rust source code: src/stdlib/mod.rs:110

throw()

throw(msg: ...String)

Rust source code: src/stdlib/mod.rs:288

concat()

concat(Array<Array|Bytes|String|Number|Psbt>) -> Array|Bytes|String|Number|Psbt|null

Minsc source code: src/stdlib/stdlib.minsc:45

Numeric

abs()

abs(Int|Float) -> Int|Float

Minsc source code: src/stdlib/stdlib.minsc:69

min()

min(a: Int|Float, b: Int|Float) -> Int|Float

Minsc source code: src/stdlib/stdlib.minsc:68

max()

max(a: Int|Float, b: Int|Float) -> Int|Float

Minsc source code: src/stdlib/stdlib.minsc:67

sum()

sum(Array<Int|Float>) -> Int|Float

Minsc source code: src/stdlib/stdlib.minsc:70

MAX_INTEGER Int

MAX_INTEGER = 9223372036854775807

MIN_INTEGER Int

MIN_INTEGER = -9223372036854775808

NaN Float

NaN = NaN_f64

Not a Number. Returned by some floating-point operations, like 0.0/0.0.

inf Float

inf = +Inf_f64

Point at Infinity. Returned by some floating-point operations, like 1.0/0.0.

String

join()

join(strs: Array<String>, separator: String) -> String

Minsc source code: src/stdlib/stdlib.minsc:90

Array

map()

map(arr: Array, fn: Function) -> Array

Minsc source code: src/stdlib/stdlib.minsc:26

flatMap()

flatMap(arr: Array, fn: Function) -> Array

Minsc source code: src/stdlib/stdlib.minsc:29

filter()

filter(arr: Array, predicate: Function) -> Array

Minsc source code: src/stdlib/stdlib.minsc:28

filterMap()

filterMap(arr: Array, fn: Function) -> Array

Minsc source code: src/stdlib/stdlib.minsc:34

filterMap::skip Symbol

each()

each(arr: Array, fn: Function)

Minsc source code: src/stdlib/stdlib.minsc:30

reduce()

reduce(arr: Array, fn: Function) -> Any

Minsc source code: src/stdlib/stdlib.minsc:32

fold()

fold(arr: Array, initial: Any, fn: Function) -> Any

Rust source code: src/stdlib/mod.rs:126

foldUntil()

foldUntil(arr: Array, initial: Any, fn: Function) -> Any

Rust source code: src/stdlib/mod.rs:139

slice()

slice(arr: Array<T>, start: Int, len: Int = {ALL}) -> Array<T>

Minsc source code: src/stdlib/stdlib.minsc:20

tail()

tail(Array<T>) -> Array<T>

Minsc source code: src/stdlib/stdlib.minsc:21

initial()

initial(Array<T>) -> Array<T>

Minsc source code: src/stdlib/stdlib.minsc:22

last()

last(Array<T>) -> T

Minsc source code: src/stdlib/stdlib.minsc:16

find()

find(arr: Array<T>, predicate: Function) -> T|null

Minsc source code: src/stdlib/stdlib.minsc:37

some()

some(arr: Array<T>, predicate: Function) -> Bool

Minsc source code: src/stdlib/stdlib.minsc:38

every()

every(arr: Array<T>, predicate: Function) -> Bool

Minsc source code: src/stdlib/stdlib.minsc:39

contains()

contains(arr: Array<T>, needle: T) -> Bool

Minsc source code: src/stdlib/stdlib.minsc:41

startsWith()

startsWith(arr: Array<T>, prefix: Array<T>) -> Bool

Minsc source code: src/stdlib/stdlib.minsc:43

indices()

indices(Array) -> Array<Int>

Minsc source code: src/stdlib/stdlib.minsc:18

enumerated()

enumerated(Array<T>) -> Array<Int:T>

Minsc source code: src/stdlib/stdlib.minsc:23

reverse()

reverse(Array<T>) -> Array<T>

Minsc source code: src/stdlib/stdlib.minsc:42

flatten()

flatten(Array<Array<T>>) -> Array<T>

Minsc source code: src/stdlib/stdlib.minsc:46

fillArray()

fillArray(size: Int, value: Any|Function) -> Array

Rust source code: src/stdlib/mod.rs:159

range()

range(start: Int, end: Int) -> Array<Int>

Minsc source code: src/stdlib/stdlib.minsc:17

Tagged Arrays

keys()

keys(Array<Key:Val>) -> Array<Key>

Minsc source code: src/stdlib/stdlib.minsc:55

values()

values(Array<Key:Val>) -> Array<Val>

Minsc source code: src/stdlib/stdlib.minsc:56

set()

set(original: Array<Key:Val>, fields: Array<Key:Val>) -> Array<Key:Val>

Minsc source code: src/stdlib/stdlib.minsc:58

set::UNSET Symbol

unset()

unset(original: Array<Key:Val>, keys: Array<Key>) -> Array<Key:Val>

Minsc source code: src/stdlib/stdlib.minsc:64

Encoding

hex()

hex(Bytes) -> String

base64()

base64(Bytes) -> String

debug()

debug(Any) -> String

Get the debug representation of the given value in Rust's std::fmt::Debug formatting

Rust source code: src/stdlib/mod.rs:232

repr()

repr(Any) -> String

Rust source code: src/stdlib/mod.rs:247

pretty()

pretty(Any) -> String

Rust source code: src/stdlib/mod.rs:255

le64()

le64(Int) -> Bytes

Rust source code: src/stdlib/mod.rs:225

Logging

print()

print(...String)

Rust source code: src/stdlib/mod.rs:294

log()

log(...String)

Rust source code: src/stdlib/mod.rs:306

warn()

warn(...String)

Rust source code: src/stdlib/mod.rs:313

Symbols

null Symbol

default Symbol

BOO Symbol

Boo, The Miniature Giant Space Hamster

Dev Utils

env()

env(depth: Int = -1) -> Array<Key:Value>

Rust source code: src/stdlib/mod.rs:275

env::debug()

env::debug(depth: Int = -1) -> Symbol

Minsc source code: src/stdlib/stdlib.minsc:114

env::repr()

env::repr(depth: Int = -1) -> Symbol

Minsc source code: src/stdlib/stdlib.minsc:113

env::pretty()

env::pretty(depth: Int = -1) -> Symbol

Minsc source code: src/stdlib/stdlib.minsc:112