]> gitweb.factorcode.org Git - factor.git/commitdiff
slots: Fix non-idiomatic code example in docs
authorGiftpflanze <80504430+gifti258@users.noreply.github.com>
Thu, 31 Aug 2023 18:43:31 +0000 (20:43 +0200)
committerGitHub <noreply@github.com>
Thu, 31 Aug 2023 18:43:31 +0000 (20:43 +0200)
core/slots/slots-docs.factor

index 6201a5c7e58919f82d2f8388952e89ba87e0951d..3cc7c63416c1f0274b2c4dbe166178cdbe3a3744 100644 (file)
@@ -52,7 +52,7 @@ $nl
 "The changer word abstracts a common pattern where a slot value is read then stored again; so the following is not idiomatic code:"
 { $code
     "find-manager"
-    "    salary>> 0.75 * >>salary"
+    "    dup salary>> 0.75 * >>salary"
 }
 "The following version is preferred:"
 { $code