on master help sign in
Merge pull request #594 from jfranklin9000/stdlib
6487c21rmariani
reference/library/2b.md+48−1
@@ -786,6 +786,8 @@ Accepts an atom `a` and list `b`, producing the remaining elements from
786
786
787#### Accepts
787#### Accepts
788
788
789+`a` is an atom.
790+
789`b` is a list.
791`b` is a list.
790
792
791#### Produces
793#### Produces
@@ -824,6 +826,8 @@ of `a`and failing if the list is null. Lists are 0-indexed.
824
826
825#### Accepts
827#### Accepts
826
828
829+`a` is an atom.
830+
827`b` is a list.
831`b` is a list.
828
832
829#### Produces
833#### Produces
@@ -853,6 +857,41 @@ Produces an element of `b`, or crashes if no element exists at that index.
853```
857```
854
858
855
859
860+---
861+### `++snoc`
862+
863+Append
864+
865+Accepts a `++list` `a` and a noun `b`, producing the list of `b` appended to `a`.
866+
867+#### Accepts
868+
869+`a` is a list.
870+
871+`b` is a noun.
872+
873+#### Produces
874+
875+Produces a list of `b` appended to `a`.
876+
877+#### Source
878+
879+```
880+ ++ snoc
881+ |* [a/(list) b/*]
882+ (weld a ^+(a [b]~))
883+```
884+
885+#### Examples
886+
887+```
888+ > `tape`(zing (snoc `(list tape)`~["a" "bc" "def"] "g"))
889+ "abcdefg"
890+ > (snoc `(list @ud)`~[1 2 3] 4)
891+ ~[1 2 3 4]
892+```
893+
894+
856---
895---
857### `++sort`
896### `++sort`
858
897
@@ -864,6 +903,8 @@ sorted according to `b`.
864
903
865#### Accepts
904#### Accepts
866
905
906+`a` is a list.
907+
867`b` is a gate that accepts two nouns and produces a boolean.
908`b` is a gate that accepts two nouns and produces a boolean.
868
909
869#### Produces
910#### Produces
@@ -1015,6 +1056,10 @@ inclusive index `a`, producing `b` number of characters.
1015
1056
1016#### Accepts
1057#### Accepts
1017
1058
1059+`a` is an atom.
1060+
1061+`b` is an atom.
1062+
1018`c` is a list.
1063`c` is a list.
1019
1064
1020#### Produces
1065#### Produces
@@ -1025,7 +1070,7 @@ A list of the same type as `c`.
1025
1070
1026```
1071```
1027 ++ swag
1072 ++ swag
1028− |* [[a=@ a=@] c=(list)]
1073+ |* [[a=@ b=@] c=(list)]
1029 (scag +<-> (slag +<-< c))
1074 (scag +<-> (slag +<-< c))
1030```
1075```
1031
1076
@@ -1050,6 +1095,8 @@ to each element of the original list.
1050
1095
1051#### Accepts
1096#### Accepts
1052
1097
1098+`a` is a list.
1099+
1053`b` is a gate.
1100`b` is a gate.
1054
1101
1055#### Produces
1102#### Produces
reference/library/_index.md+2
@@ -613,6 +613,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
613[`++smyt`](@/docs/reference/library/4m.md#smyt)
613[`++smyt`](@/docs/reference/library/4m.md#smyt)
614[`++snag`](@/docs/reference/library/2b.md#snag)
614[`++snag`](@/docs/reference/library/2b.md#snag)
615[`++snag:nl`](@/docs/reference/library/2m.md#snag-nl)
615[`++snag:nl`](@/docs/reference/library/2m.md#snag-nl)
616+[`++snoc`](@/docs/reference/library/2b.md#snoc)
616[`++so`](@/docs/reference/library/4l.md#so)
617[`++so`](@/docs/reference/library/4l.md#so)
617[`++soft`](@/docs/reference/library/2n.md#soft)
618[`++soft`](@/docs/reference/library/2n.md#soft)
618[`++some`](@/docs/reference/library/2a.md#some)
619[`++some`](@/docs/reference/library/2a.md#some)
@@ -881,6 +882,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
881[`++skip`](@/docs/reference/library/2b.md#skip)
882[`++skip`](@/docs/reference/library/2b.md#skip)
882[`++slag`](@/docs/reference/library/2b.md#slag)
883[`++slag`](@/docs/reference/library/2b.md#slag)
883[`++snag`](@/docs/reference/library/2b.md#snag)
884[`++snag`](@/docs/reference/library/2b.md#snag)
885+[`++snoc`](@/docs/reference/library/2b.md#snoc)
884[`++sort`](@/docs/reference/library/2b.md#sort)
886[`++sort`](@/docs/reference/library/2b.md#sort)
885[`++spin`](@/docs/reference/library/2b.md#spin)
887[`++spin`](@/docs/reference/library/2b.md#spin)
886[`++spun`](@/docs/reference/library/2b.md#spun)
888[`++spun`](@/docs/reference/library/2b.md#spun)