]> gitweb.factorcode.org Git - factor.git/blob - extra/math/derivatives/syntax/syntax-docs.factor
2273e7b83c3f467cc3421b3c09231fdc86b3e3f2
[factor.git] / extra / math / derivatives / syntax / syntax-docs.factor
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
5
6 HELP: DERIVATIVE:
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." }
8 { $examples 
9     { $unchecked-example "USING: math math.functions math.derivatives.syntax ;"
10     "DERIVATIVE: sin [ cos * ]"
11     "DERIVATIVE: * [ nip * ] [ drop * ]" "" }
12 } ;
13
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."
16 ;
17
18 ABOUT: "math.derivatives.syntax"