Added links in Appendix A
This commit is contained in:
parent
d895dfec18
commit
3ec01d0f23
|
|
@ -10,15 +10,15 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
|
|
||||||
### Standard Library Categories
|
### Standard Library Categories
|
||||||
|
|
||||||
**Array Operations**: at, concat, each, filter, length, map, reduce, reverse, shape, slice, transpose, window
|
**Array Operations**: [at](#at), [concat](#concat), [each](#each), [filter](#filter), [length](#length), [map](#map), [reduce](#reduce), [reverse](#reverse), [shape](#shape), [slice](#slice), [transpose](#transpose), [window](#window)
|
||||||
|
|
||||||
**I/O Operations**: input, print, read, write
|
**I/O Operations**: [at](#at), [concat](#concat), [each](#each), [filter](#filter)
|
||||||
|
|
||||||
**String Operations**: concat, join, length, split, substr
|
**String Operations**: [length](#length), [map](#map) [reduce](#reduce), [reverse](#reverse), [shape](#shape)
|
||||||
|
|
||||||
**Type Conversion**: parse, to_i8, to_i16, to_i32, to_i64, to_u8, to_u16, to_u32, to_u64, to_f32, to_f64, to_str
|
**Type Conversion**: [slice](#slice), [to_i8, to_i16, to_i32, to_i64](#to_i8-to_i16-to_i32-to_i64), [to_u8, to_u16, to_u32, to_u64](#to_u8-to_u16-to_u32-to_u64), [to_f32, to_f64](#to_f32-to_f64), [to_str](#to_str)
|
||||||
|
|
||||||
**Utility Operations**: eval, lambda
|
**Utility Operations**: [transpose](#transpose), [window](#window)
|
||||||
|
|
||||||
### Alphabetical Reference
|
### Alphabetical Reference
|
||||||
|
|
||||||
|
|
@ -30,7 +30,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
[10 20 30] 1 at // Returns 20
|
[10 20 30] 1 at // Returns 20
|
||||||
```
|
```
|
||||||
**See Also**: slice, length
|
**See Also**: [slice](#slice), [length](#length)
|
||||||
|
|
||||||
#### concat
|
#### concat
|
||||||
**Signature**: `(Concatenable Concatenable -- Concatenable)`
|
**Signature**: `(Concatenable Concatenable -- Concatenable)`
|
||||||
|
|
@ -41,7 +41,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
[1 2 3] [4 5 6] concat // Returns [1 2 3 4 5 6]
|
[1 2 3] [4 5 6] concat // Returns [1 2 3 4 5 6]
|
||||||
"hello" " world" concat // Returns "hello world"
|
"hello" " world" concat // Returns "hello world"
|
||||||
```
|
```
|
||||||
**See Also**: join, split
|
**See Also**: [join](#join), [split](#split)
|
||||||
|
|
||||||
#### depth
|
#### depth
|
||||||
**Signature**: `(-- Size)`
|
**Signature**: `(-- Size)`
|
||||||
|
|
@ -51,7 +51,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
1 2 3 depth // Returns 1 2 3 3
|
1 2 3 depth // Returns 1 2 3 3
|
||||||
```
|
```
|
||||||
**See Also**: pick, roll
|
**See Also**: [pick](#pick), [roll](#roll)
|
||||||
|
|
||||||
#### drop
|
#### drop
|
||||||
**Signature**: `(Self --)`
|
**Signature**: `(Self --)`
|
||||||
|
|
@ -61,7 +61,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
5 10 drop // Returns 5
|
5 10 drop // Returns 5
|
||||||
```
|
```
|
||||||
**See Also**: dup, swap
|
**See Also**: [dup](#dup), [swap](#swap)
|
||||||
|
|
||||||
#### dup
|
#### dup
|
||||||
**Signature**: `(Self -- Self Self)`
|
**Signature**: `(Self -- Self Self)`
|
||||||
|
|
@ -71,7 +71,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
5 dup // Returns 5 5
|
5 dup // Returns 5 5
|
||||||
```
|
```
|
||||||
**See Also**: drop, over
|
**See Also**: [drop](#drop), [over](#over)
|
||||||
|
|
||||||
#### each
|
#### each
|
||||||
**Signature**: `(ArrayOf<T> TokenString --)`
|
**Signature**: `(ArrayOf<T> TokenString --)`
|
||||||
|
|
@ -80,7 +80,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
[1 2 3] { print } each // Prints 1, 2, 3
|
[1 2 3] { print } each // Prints 1, 2, 3
|
||||||
```
|
```
|
||||||
**See Also**: map, filter
|
**See Also**: [map](#map), [filter](#filter)
|
||||||
|
|
||||||
#### eval
|
#### eval
|
||||||
**Signature**: `(TokenString --)`
|
**Signature**: `(TokenString --)`
|
||||||
|
|
@ -90,7 +90,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
"2 3 +" eval // Returns 5
|
"2 3 +" eval // Returns 5
|
||||||
```
|
```
|
||||||
**See Also**: lambda
|
**See Also**: [lambda](#lambda)
|
||||||
|
|
||||||
#### filter
|
#### filter
|
||||||
**Signature**: `(ArrayOf<T> TokenString -- ArrayOf<T>)`
|
**Signature**: `(ArrayOf<T> TokenString -- ArrayOf<T>)`
|
||||||
|
|
@ -99,7 +99,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
[1 2 3 4 5] { 2 % 0 == } filter // Returns [2 4]
|
[1 2 3 4 5] { 2 % 0 == } filter // Returns [2 4]
|
||||||
```
|
```
|
||||||
**See Also**: map, reduce
|
**See Also**: [map](#map), [reduce](#reduce)
|
||||||
|
|
||||||
#### input
|
#### input
|
||||||
**Signature**: `(String -- String)`
|
**Signature**: `(String -- String)`
|
||||||
|
|
@ -108,7 +108,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
"Enter name: " input // Prompts and returns user input
|
"Enter name: " input // Prompts and returns user input
|
||||||
```
|
```
|
||||||
**See Also**: print, read
|
**See Also**: [print](#print), [read](#read)
|
||||||
|
|
||||||
#### join
|
#### join
|
||||||
**Signature**: `(ArrayOf<String> String -- String)`
|
**Signature**: `(ArrayOf<String> String -- String)`
|
||||||
|
|
@ -117,7 +117,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
["a" "b" "c"] "," join // Returns "a,b,c"
|
["a" "b" "c"] "," join // Returns "a,b,c"
|
||||||
```
|
```
|
||||||
**See Also**: split, concat
|
**See Also**: [split](#split), [concat](#concat)
|
||||||
|
|
||||||
#### lambda
|
#### lambda
|
||||||
**Signature**: `(TokenString -- Callable)`
|
**Signature**: `(TokenString -- Callable)`
|
||||||
|
|
@ -128,7 +128,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
{ dup * } lambda ::square swap
|
{ dup * } lambda ::square swap
|
||||||
5 square eval // Returns 25
|
5 square eval // Returns 25
|
||||||
```
|
```
|
||||||
**See Also**: eval
|
**See Also**: [eval](#eval)
|
||||||
|
|
||||||
#### length
|
#### length
|
||||||
**Signature**: `(Sized -- i64)`
|
**Signature**: `(Sized -- i64)`
|
||||||
|
|
@ -139,7 +139,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
[1 2 3 4 5] length // Returns 5
|
[1 2 3 4 5] length // Returns 5
|
||||||
"hello" length // Returns 5
|
"hello" length // Returns 5
|
||||||
```
|
```
|
||||||
**See Also**: at, slice
|
**See Also**: [at](#at), [slice](#slice)
|
||||||
|
|
||||||
#### map
|
#### map
|
||||||
**Signature**: `(ArrayOf<T> TokenString -- ArrayOf<U>)`
|
**Signature**: `(ArrayOf<T> TokenString -- ArrayOf<U>)`
|
||||||
|
|
@ -148,7 +148,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
[1 2 3 4] { 2 * } map // Returns [2 4 6 8]
|
[1 2 3 4] { 2 * } map // Returns [2 4 6 8]
|
||||||
```
|
```
|
||||||
**See Also**: filter, reduce, each
|
**See Also**: [filter](#filter), [reduce](#reduce), [each](#each)
|
||||||
|
|
||||||
#### over
|
#### over
|
||||||
**Signature**: `(Self Self -- Self Self Self)`
|
**Signature**: `(Self Self -- Self Self Self)`
|
||||||
|
|
@ -158,7 +158,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
5 10 over // Returns 5 10 5
|
5 10 over // Returns 5 10 5
|
||||||
```
|
```
|
||||||
**See Also**: dup, swap, rot
|
**See Also**: [dup](#dup), [swap](#swap), [rot](#rot)
|
||||||
|
|
||||||
#### parse
|
#### parse
|
||||||
**Signature**: `(String -- Parseable)`
|
**Signature**: `(String -- Parseable)`
|
||||||
|
|
@ -168,7 +168,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
"123" parse // Returns 123 (as appropriate numeric type)
|
"123" parse // Returns 123 (as appropriate numeric type)
|
||||||
```
|
```
|
||||||
**See Also**: to_str
|
**See Also**: [to_str](#to_str)
|
||||||
|
|
||||||
#### pick
|
#### pick
|
||||||
**Signature**: `(Size -- Self)`
|
**Signature**: `(Size -- Self)`
|
||||||
|
|
@ -178,7 +178,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
1 2 3 4 2 pick // Returns 1 2 3 4 2
|
1 2 3 4 2 pick // Returns 1 2 3 4 2
|
||||||
```
|
```
|
||||||
**See Also**: roll, depth
|
**See Also**: [roll](#roll), [depth](#depth)
|
||||||
|
|
||||||
#### print
|
#### print
|
||||||
**Signature**: `(Stringifiable --)`
|
**Signature**: `(Stringifiable --)`
|
||||||
|
|
@ -188,7 +188,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
"Hello" print // Prints: Hello
|
"Hello" print // Prints: Hello
|
||||||
42 print // Prints: 42
|
42 print // Prints: 42
|
||||||
```
|
```
|
||||||
**See Also**: input, to_str
|
**See Also**: [input](#input), [to_str](#to_str)
|
||||||
|
|
||||||
#### read
|
#### read
|
||||||
**Signature**: `(String -- String)`
|
**Signature**: `(String -- String)`
|
||||||
|
|
@ -197,7 +197,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
"file.txt" read // Returns file contents
|
"file.txt" read // Returns file contents
|
||||||
```
|
```
|
||||||
**See Also**: write
|
**See Also**: [write](#write)
|
||||||
|
|
||||||
#### reduce
|
#### reduce
|
||||||
**Signature**: `(ArrayOf<T> T TokenString -- T)`
|
**Signature**: `(ArrayOf<T> T TokenString -- T)`
|
||||||
|
|
@ -206,7 +206,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
[1 2 3 4] 0 { + } reduce // Returns 10
|
[1 2 3 4] 0 { + } reduce // Returns 10
|
||||||
```
|
```
|
||||||
**See Also**: map, filter
|
**See Also**: [map](#map), [filter](#filter)
|
||||||
|
|
||||||
#### reverse
|
#### reverse
|
||||||
**Signature**: `(ArrayOf<T> -- ArrayOf<T>)`
|
**Signature**: `(ArrayOf<T> -- ArrayOf<T>)`
|
||||||
|
|
@ -215,7 +215,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
[1 2 3] reverse // Returns [3 2 1]
|
[1 2 3] reverse // Returns [3 2 1]
|
||||||
```
|
```
|
||||||
**See Also**: transpose
|
**See Also**: [transpose](#transpose)
|
||||||
|
|
||||||
#### roll
|
#### roll
|
||||||
**Signature**: `(Size Size --)`
|
**Signature**: `(Size Size --)`
|
||||||
|
|
@ -225,7 +225,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
1 2 3 4 3 1 roll // Rotates top 3 once: 1 3 4 2
|
1 2 3 4 3 1 roll // Rotates top 3 once: 1 3 4 2
|
||||||
```
|
```
|
||||||
**See Also**: rot, pick
|
**See Also**: [rot](#rot), [pick](#pick)
|
||||||
|
|
||||||
#### rot
|
#### rot
|
||||||
**Signature**: `(Self Self Self -- Self Self Self)`
|
**Signature**: `(Self Self Self -- Self Self Self)`
|
||||||
|
|
@ -235,7 +235,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
1 2 3 rot // Returns 2 3 1
|
1 2 3 rot // Returns 2 3 1
|
||||||
```
|
```
|
||||||
**See Also**: swap, roll
|
**See Also**: [swap](#swap), [roll](#roll)
|
||||||
|
|
||||||
#### slice
|
#### slice
|
||||||
**Signature**: `(Sliceable Size Size -- Sliceable)`
|
**Signature**: `(Sliceable Size Size -- Sliceable)`
|
||||||
|
|
@ -245,7 +245,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
[10 20 30 40] 1 3 slice // Returns [20 30]
|
[10 20 30 40] 1 3 slice // Returns [20 30]
|
||||||
```
|
```
|
||||||
**See Also**: at, length
|
**See Also**: [at](#at), [length](#length)
|
||||||
|
|
||||||
#### split
|
#### split
|
||||||
**Signature**: `(String String -- ArrayOf<String>)`
|
**Signature**: `(String String -- ArrayOf<String>)`
|
||||||
|
|
@ -255,7 +255,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
"a,b,c" "," split // Returns ["a" "b" "c"]
|
"a,b,c" "," split // Returns ["a" "b" "c"]
|
||||||
```
|
```
|
||||||
**See Also**: join, substr
|
**See Also**: [join](#join), [substr](#substr)
|
||||||
|
|
||||||
#### substr
|
#### substr
|
||||||
**Signature**: `(String Size Size -- String)`
|
**Signature**: `(String Size Size -- String)`
|
||||||
|
|
@ -265,7 +265,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
"hello" 1 3 substr // Returns "el"
|
"hello" 1 3 substr // Returns "el"
|
||||||
```
|
```
|
||||||
**See Also**: slice, split
|
**See Also**: [slice](#slice), [split](#split)
|
||||||
|
|
||||||
#### swap
|
#### swap
|
||||||
**Signature**: `(Self Self -- Self Self)`
|
**Signature**: `(Self Self -- Self Self)`
|
||||||
|
|
@ -275,7 +275,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
5 10 swap // Returns 10 5
|
5 10 swap // Returns 10 5
|
||||||
```
|
```
|
||||||
**See Also**: dup, rot
|
**See Also**: [dup](#dup), [rot](#rot)
|
||||||
|
|
||||||
#### to_f32, to_f64
|
#### to_f32, to_f64
|
||||||
**Signature**: `(Convertible -- f32/f64)`
|
**Signature**: `(Convertible -- f32/f64)`
|
||||||
|
|
@ -285,7 +285,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
42 to_f64 // Returns 42.0
|
42 to_f64 // Returns 42.0
|
||||||
```
|
```
|
||||||
**See Also**: to_i32, to_str
|
**See Also**: [to_i8, to_i16, to_i32, to_i64](#to_i8-to_i16-to_i32-to_i64), [to_u8, to_u16, to_u32, to_u64](#to_u8-to_u16-to_u32-to_u64)
|
||||||
|
|
||||||
#### to_i8, to_i16, to_i32, to_i64
|
#### to_i8, to_i16, to_i32, to_i64
|
||||||
**Signature**: `(Convertible -- i8/i16/i32/i64)`
|
**Signature**: `(Convertible -- i8/i16/i32/i64)`
|
||||||
|
|
@ -295,7 +295,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
3.14 to_i32 // Returns 3 (truncates)
|
3.14 to_i32 // Returns 3 (truncates)
|
||||||
```
|
```
|
||||||
**See Also**: to_u32, to_f64
|
**See Also**: [to_u8, to_u16, to_u32, to_u64](#to_u8-to_u16-to_u32-to_u64), [to_f32, to_f64](#to_f32-to_f64)
|
||||||
|
|
||||||
#### to_str
|
#### to_str
|
||||||
**Signature**: `(Stringifiable -- String)`
|
**Signature**: `(Stringifiable -- String)`
|
||||||
|
|
@ -305,7 +305,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
42 to_str // Returns "42"
|
42 to_str // Returns "42"
|
||||||
```
|
```
|
||||||
**See Also**: parse, print
|
**See Also**: [parse](#parse), [print](#print)
|
||||||
|
|
||||||
#### to_u8, to_u16, to_u32, to_u64
|
#### to_u8, to_u16, to_u32, to_u64
|
||||||
**Signature**: `(Convertible -- u8/u16/u32/u64)`
|
**Signature**: `(Convertible -- u8/u16/u32/u64)`
|
||||||
|
|
@ -315,7 +315,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
42 to_u32 // Returns 42 (as u32)
|
42 to_u32 // Returns 42 (as u32)
|
||||||
```
|
```
|
||||||
**See Also**: to_i32, to_f64
|
**See Also**: [to_i8, to_i16, to_i32, to_i64](#to_i8-to_i16-to_i32-to_i64), [to_f32, to_f64](#to_f32-to_f64)
|
||||||
|
|
||||||
#### transpose
|
#### transpose
|
||||||
**Signature**: `(ArrayOf<ArrayOf<T>> -- ArrayOf<ArrayOf<T>>)`
|
**Signature**: `(ArrayOf<ArrayOf<T>> -- ArrayOf<ArrayOf<T>>)`
|
||||||
|
|
@ -324,7 +324,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
[[1 2] [3 4]] transpose // Returns [[1 3] [2 4]]
|
[[1 2] [3 4]] transpose // Returns [[1 3] [2 4]]
|
||||||
```
|
```
|
||||||
**See Also**: reverse
|
**See Also**: [reverse](#reverse)
|
||||||
|
|
||||||
#### window
|
#### window
|
||||||
**Signature**: `(ArrayOf<T> Size -- ArrayOf<ArrayOf<T>>)`
|
**Signature**: `(ArrayOf<T> Size -- ArrayOf<ArrayOf<T>>)`
|
||||||
|
|
@ -333,7 +333,7 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
[1 2 3 4] 2 window // Returns [[1 2] [2 3] [3 4]]
|
[1 2 3 4] 2 window // Returns [[1 2] [2 3] [3 4]]
|
||||||
```
|
```
|
||||||
**See Also**: slice
|
**See Also**: [slice](#slice)
|
||||||
|
|
||||||
#### write
|
#### write
|
||||||
**Signature**: `(String String --)`
|
**Signature**: `(String String --)`
|
||||||
|
|
@ -342,6 +342,6 @@ This appendix provides a complete alphabetical reference of all standard library
|
||||||
```
|
```
|
||||||
"data" "file.txt" write // Writes "data" to file.txt
|
"data" "file.txt" write // Writes "data" to file.txt
|
||||||
```
|
```
|
||||||
**See Also**: read
|
**See Also**: [read](#read)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue