Next  |  Prev  |  Up  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search


Partial Function Application

FAUST supports partial application of functions. For example, if f(x,y) specifies some stereo process, then f(x) specifies the same stereo process, but the left channel has a formal-parameter name x and the right channel remains an unnamed input wire:

Figure 4: process(x) = x,_;
\includegraphics{eps/xwire}

A common use of partial function application is to define named special cases:

  general_case(case,arg1,arg2,...) = ...;
  special_case_1 = general_case(1);
  special_case_2 = general_case(2);
  ...


Next  |  Prev  |  Up  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Download aspf.pdf
[Comment on this page via email]

``Audio Signal Processing in Faust'', by Julius O. Smith III.
Copyright © 2022-05-05 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA