diff --git a/core/checksums/checksums-docs.factor b/core/checksums/checksums-docs.factor index 9196008ba6..6ef0e85025 100644 --- a/core/checksums/checksums-docs.factor +++ b/core/checksums/checksums-docs.factor @@ -49,4 +49,7 @@ $nl { $vocab-subsection "MD5 checksum" "checksums.md5" } { $vocab-subsection "SHA1 checksum" "checksums.sha1" } { $vocab-subsection "SHA2 checksum" "checksums.sha2" } -{ $vocab-subsection "Adler-32 checksum" "checksums.adler-32" } ; +{ $vocab-subsection "Adler-32 checksum" "checksums.adler-32" } +{ $vocab-subsection "OpenSSL checksums" "checksums.openssl" } ; + +ABOUT: "checksums" diff --git a/core/kernel/kernel-docs.factor b/core/kernel/kernel-docs.factor index 0ef8919713..d142255535 100755 --- a/core/kernel/kernel-docs.factor +++ b/core/kernel/kernel-docs.factor @@ -148,7 +148,7 @@ $nl { $subsection "spread-shuffle-equivalence" } ; ARTICLE: "apply-combinators" "Apply combinators" -"The apply combinators apply multiple quotations to multiple values. The " { $snippet "@" } " suffix signifies application." +"The apply combinators apply a single quotation to multiple values. The " { $snippet "@" } " suffix signifies application." $nl "Two quotations:" { $subsection bi@ } @@ -179,6 +179,7 @@ ARTICLE: "compositional-combinators" "Compositional combinators" { $subsection with } { $subsection compose } { $subsection 3compose } +{ $subsection prepose } "Quotations also implement the sequence protocol, and can be manipulated with sequence words; see " { $link "quotations" } "." ; ARTICLE: "implementing-combinators" "Implementing combinators" @@ -835,8 +836,16 @@ HELP: compose ( quot1 quot2 -- compose ) "However, " { $link compose } " runs in constant time, and the optimizing compiler is able to compile code which calls composed quotations." } ; + +HELP: prepose +{ $values { "quot1" callable } { "quot2" callable } { "compose" compose } } +{ $description "Quotation composition. Outputs a " { $link callable } " which calls " { $snippet "quot2" } " followed by " { $snippet "quot1" } "." } +{ $notes "See " { $link compose } " for details." } ; + +{ compose prepose } related-words + HELP: 3compose -{ $values { "quot1" callable } { "quot2" callable } { "quot3" callable } { "curry" curry } } +{ $values { "quot1" callable } { "quot2" callable } { "quot3" callable } { "compose" compose } } { $description "Quotation composition. Outputs a " { $link callable } " which calls " { $snippet "quot1" } ", " { $snippet "quot2" } " and then " { $snippet "quot3" } "." } { $notes "The three quotations must leave the retain stack in the same state on exit as it was on entry, so for example, the following code is not allowed:" diff --git a/core/kernel/kernel.factor b/core/kernel/kernel.factor index a72e25b9e0..a989d6c833 100755 --- a/core/kernel/kernel.factor +++ b/core/kernel/kernel.factor @@ -156,10 +156,10 @@ M: callstack clone (clone) ; : with ( param obj quot -- obj curry ) swapd [ swapd call ] 2curry ; inline -: prepose ( quot1 quot2 -- curry ) +: prepose ( quot1 quot2 -- compose ) swap compose ; inline -: 3compose ( quot1 quot2 quot3 -- curry ) +: 3compose ( quot1 quot2 quot3 -- compose ) compose compose ; inline ! Booleans diff --git a/extra/checksums/adler-32/adler-32-docs.factor b/extra/checksums/adler-32/adler-32-docs.factor index b7400cbaa0..3e4e5d8210 100755 --- a/extra/checksums/adler-32/adler-32-docs.factor +++ b/extra/checksums/adler-32/adler-32-docs.factor @@ -2,7 +2,7 @@ USING: help.markup help.syntax ; IN: checksums.adler-32 HELP: adler-32 -{ $description "Adler-32 checksum algorithm." } ; +{ $class-description "Adler-32 checksum algorithm." } ; ARTICLE: "checksums.adler-32" "Adler-32 checksum" "The Adler-32 checksum algorithm implements simple and fast checksum. It is used in zlib and rsync." diff --git a/extra/checksums/md5/md5-docs.factor b/extra/checksums/md5/md5-docs.factor index dca039d1d3..4e475b18a0 100755 --- a/extra/checksums/md5/md5-docs.factor +++ b/extra/checksums/md5/md5-docs.factor @@ -2,7 +2,7 @@ USING: help.markup help.syntax ; IN: checksums.md5 HELP: md5 -{ $description "MD5 checksum algorithm." } ; +{ $class-description "MD5 checksum algorithm." } ; ARTICLE: "checksums.md5" "MD5 checksum" "The MD5 checksum algorithm implements a one-way hash function. While it is widely used, many weaknesses are known and it should not be used in new applications (" { $url "http://www.schneier.com/blog/archives/2005/03/more_hash_funct.html" } ")." diff --git a/extra/checksums/sha1/sha1-docs.factor b/extra/checksums/sha1/sha1-docs.factor index 8b8bf1cfa9..2c9093865f 100644 --- a/extra/checksums/sha1/sha1-docs.factor +++ b/extra/checksums/sha1/sha1-docs.factor @@ -2,7 +2,7 @@ USING: help.markup help.syntax ; IN: checksums.sha1 HELP: sha1 -{ $description "SHA1 checksum algorithm." } ; +{ $class-description "SHA1 checksum algorithm." } ; ARTICLE: "checksums.sha1" "SHA1 checksum" "The SHA1 checksum algorithm implements a one-way hash function. It is generally considered to be stronger than MD5, however there is a known algorithm for finding collisions more effectively than a brute-force search (" { $url "http://www.schneier.com/blog/archives/2005/02/sha1_broken.html" } ")." diff --git a/extra/checksums/sha2/sha2-docs.factor b/extra/checksums/sha2/sha2-docs.factor index c39831b266..6a128552fd 100644 --- a/extra/checksums/sha2/sha2-docs.factor +++ b/extra/checksums/sha2/sha2-docs.factor @@ -2,7 +2,7 @@ USING: help.markup help.syntax ; IN: checksums.sha2 HELP: sha-256 -{ $description "SHA-256 checksum algorithm." } ; +{ $class-description "SHA-256 checksum algorithm." } ; ARTICLE: "checksums.sha2" "SHA2 checksum" "The SHA2 checksum algorithm implements a one-way hash function. It is generally considered to be pretty strong."