]> gitweb.factorcode.org Git - factor.git/blob - extra/math/function-tools/function-tools.factor
Merge branch 'master' into experimental
[factor.git] / extra / math / function-tools / function-tools.factor
1 ! Copyright © 2008 Reginald Keith Ford II
2 ! Tools for quickly comparing, transforming, and evaluating mathematical Factor functions
3
4 USING: kernel math arrays sequences sequences.lib ;
5 IN: math.function-tools 
6 : difference-func ( func func -- func ) [ bi - ] 2curry ; inline
7 : eval ( x func -- pt ) dupd call 2array ; inline
8 : eval-inverse ( y func -- pt ) dupd call swap 2array ; inline
9 : eval3d ( x y func -- pt ) [ 2dup ] dip call 3array ; inline