Go to the first, previous, next, last section, table of contents.


Ersetzung von Teiltermen

----------------------------------------------------------------------
> module Replace        (  replace
>                       )
> where
----------------------------------------------------------------------

----------------------------------------------------------------------
> import Function       (  Prim(..), Function(..)  )
----------------------------------------------------------------------

Ersetzung

----------------------------------------------------------------------
> replace               :: (Function, Function) -> Function -> Function
> replace b@(g, h) f
>     | g == f          =  h
>     | otherwise       =  replace' b f
----------------------------------------------------------------------

----------------------------------------------------------------------
> replace' b (Derive n f)       =  Derive n (replace b f)
> replace' b (f :.: g)          =  replace b f :.: replace b g
> replace' b (Summ fs)          =  Summ [ replace b f | f<-fs ]
> replace' b (Prod fs)          =  Prod [ replace b f | f<-fs ]
> replace' b (f :^: g)          =  replace b f :^: replace b g
> replace' b f                  =  f
----------------------------------------------------------------------


Go to the first, previous, next, last section, table of contents.