1 ! Copyright (C) 2009 Jason W. Merrill.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: help.markup help.syntax ;
4 IN: math.derivatives.syntax
7 { $description "Defines the derivative of a word by setting its " { $snippet "derivative" } " word property. Reads a word followed by " { $snippet "n" } " quotations, giving the " { $snippet "n" } " partial derivatives of the word with respect to each of its arguments successively. Each quotation should take " { $snippet "n + 1" } " inputs, where the first input is an increment and the last " { $snippet "n" } " inputs are the point at which to evaluate the derivative. The derivative should be a linear function of the increment, and should have the same number of outputs as the original word." }
9 { $unchecked-example "USING: math math.functions math.derivatives.syntax ;"
10 "DERIVATIVE: sin [ cos * ]"
11 "DERIVATIVE: * [ nip * ] [ drop * ]" "" }
14 ARTICLE: "math.derivatives.syntax" "Derivative Syntax"
15 "The " { $vocab-link "math.derivatives.syntax" } " vocabulary provides the " { $link POSTPONE: DERIVATIVE: } " syntax for specifying the derivative of a word."
18 ABOUT: "math.derivatives.syntax"