diff --git a/docs/standard_library.md b/docs/standard_library.md index e5eff05..bb75f78 100644 --- a/docs/standard_library.md +++ b/docs/standard_library.md @@ -10,15 +10,15 @@ This appendix provides a complete alphabetical reference of all standard library ### 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 @@ -30,7 +30,7 @@ This appendix provides a complete alphabetical reference of all standard library ``` [10 20 30] 1 at // Returns 20 ``` -**See Also**: slice, length +**See Also**: [slice](#slice), [length](#length) #### concat **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] "hello" " world" concat // Returns "hello world" ``` -**See Also**: join, split +**See Also**: [join](#join), [split](#split) #### depth **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 ``` -**See Also**: pick, roll +**See Also**: [pick](#pick), [roll](#roll) #### drop **Signature**: `(Self --)` @@ -61,7 +61,7 @@ This appendix provides a complete alphabetical reference of all standard library ``` 5 10 drop // Returns 5 ``` -**See Also**: dup, swap +**See Also**: [dup](#dup), [swap](#swap) #### dup **Signature**: `(Self -- Self Self)` @@ -71,7 +71,7 @@ This appendix provides a complete alphabetical reference of all standard library ``` 5 dup // Returns 5 5 ``` -**See Also**: drop, over +**See Also**: [drop](#drop), [over](#over) #### each **Signature**: `(ArrayOf 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 ``` -**See Also**: map, filter +**See Also**: [map](#map), [filter](#filter) #### eval **Signature**: `(TokenString --)` @@ -90,7 +90,7 @@ This appendix provides a complete alphabetical reference of all standard library ``` "2 3 +" eval // Returns 5 ``` -**See Also**: lambda +**See Also**: [lambda](#lambda) #### filter **Signature**: `(ArrayOf TokenString -- ArrayOf)` @@ -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] ``` -**See Also**: map, reduce +**See Also**: [map](#map), [reduce](#reduce) #### input **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 ``` -**See Also**: print, read +**See Also**: [print](#print), [read](#read) #### join **Signature**: `(ArrayOf 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" ``` -**See Also**: split, concat +**See Also**: [split](#split), [concat](#concat) #### lambda **Signature**: `(TokenString -- Callable)` @@ -128,7 +128,7 @@ This appendix provides a complete alphabetical reference of all standard library { dup * } lambda ::square swap 5 square eval // Returns 25 ``` -**See Also**: eval +**See Also**: [eval](#eval) #### length **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 "hello" length // Returns 5 ``` -**See Also**: at, slice +**See Also**: [at](#at), [slice](#slice) #### map **Signature**: `(ArrayOf TokenString -- ArrayOf)` @@ -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] ``` -**See Also**: filter, reduce, each +**See Also**: [filter](#filter), [reduce](#reduce), [each](#each) #### over **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 ``` -**See Also**: dup, swap, rot +**See Also**: [dup](#dup), [swap](#swap), [rot](#rot) #### parse **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) ``` -**See Also**: to_str +**See Also**: [to_str](#to_str) #### pick **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 ``` -**See Also**: roll, depth +**See Also**: [roll](#roll), [depth](#depth) #### print **Signature**: `(Stringifiable --)` @@ -188,7 +188,7 @@ This appendix provides a complete alphabetical reference of all standard library "Hello" print // Prints: Hello 42 print // Prints: 42 ``` -**See Also**: input, to_str +**See Also**: [input](#input), [to_str](#to_str) #### read **Signature**: `(String -- String)` @@ -197,7 +197,7 @@ This appendix provides a complete alphabetical reference of all standard library ``` "file.txt" read // Returns file contents ``` -**See Also**: write +**See Also**: [write](#write) #### reduce **Signature**: `(ArrayOf 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 ``` -**See Also**: map, filter +**See Also**: [map](#map), [filter](#filter) #### reverse **Signature**: `(ArrayOf -- ArrayOf)` @@ -215,7 +215,7 @@ This appendix provides a complete alphabetical reference of all standard library ``` [1 2 3] reverse // Returns [3 2 1] ``` -**See Also**: transpose +**See Also**: [transpose](#transpose) #### roll **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 ``` -**See Also**: rot, pick +**See Also**: [rot](#rot), [pick](#pick) #### rot **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 ``` -**See Also**: swap, roll +**See Also**: [swap](#swap), [roll](#roll) #### slice **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] ``` -**See Also**: at, length +**See Also**: [at](#at), [length](#length) #### split **Signature**: `(String String -- ArrayOf)` @@ -255,7 +255,7 @@ This appendix provides a complete alphabetical reference of all standard library ``` "a,b,c" "," split // Returns ["a" "b" "c"] ``` -**See Also**: join, substr +**See Also**: [join](#join), [substr](#substr) #### substr **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" ``` -**See Also**: slice, split +**See Also**: [slice](#slice), [split](#split) #### swap **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 ``` -**See Also**: dup, rot +**See Also**: [dup](#dup), [rot](#rot) #### to_f32, to_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 ``` -**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 **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) ``` -**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 **Signature**: `(Stringifiable -- String)` @@ -305,7 +305,7 @@ This appendix provides a complete alphabetical reference of all standard library ``` 42 to_str // Returns "42" ``` -**See Also**: parse, print +**See Also**: [parse](#parse), [print](#print) #### to_u8, to_u16, to_u32, to_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) ``` -**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 **Signature**: `(ArrayOf> -- ArrayOf>)` @@ -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]] ``` -**See Also**: reverse +**See Also**: [reverse](#reverse) #### window **Signature**: `(ArrayOf Size -- ArrayOf>)` @@ -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]] ``` -**See Also**: slice +**See Also**: [slice](#slice) #### write **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 ``` -**See Also**: read +**See Also**: [read](#read) ---