]> gitweb.factorcode.org Git - factor.git/commitdiff
kernel: Improve description for `with`
authorrazetime <raghuallthetime@hotmail.com>
Sun, 22 Jan 2023 02:59:00 +0000 (08:29 +0530)
committerrazetime <raghuallthetime@hotmail.com>
Sun, 22 Jan 2023 02:59:54 +0000 (08:29 +0530)
core/kernel/kernel-docs.factor

index 561620f72e0cf7a55b27ad13373a576223bed328..e1369f94e36c418ddabc8764acab7db5f116a6ec 100644 (file)
@@ -812,10 +812,12 @@ HELP: 3curry
 
 HELP: with
 { $values { "param" object } { "obj" object } { "quot" { $quotation ( param elt -- ... ) } } { "curried" curried } }
-{ $description "Partial application on the left. The following two lines are equivalent:"
+{ $description "Similar to how " { $link curry } " binds the element below its quotation as its first argument, "
+{ $link with } " binds the second element below " { $snippet "quot" } " as the second argument of " { $snippet "quot" } "."
+$nl
+"In other words, partial application on the left. The following two lines are equivalent:"
     { $code "swap [ swap A ] curry B" }
     { $code "[ A ] with B" }
-
 }
 { $notes "This operation is efficient and does not copy the quotation." }
 { $examples