Kombinatoren für Stream Functions

sequentiell:

(>>>) :: SF a b -> SF b c -> SF a c
SF f >>> SF g = SF ( \ xs -> g (f xs) )

parallel:

(&&&) :: SF a b -> SF a c -> SF a (b,c)
(***) :: SF a c -> SF b d -> SF (a,b) (c,d)
first :: SF a b -> SF (a,c) (b,c)
Ü: definiere *** und &&& nur durch first (und arr)

(|||) :: SF a c -> SF b c 
      -> SF (Either a b) c
left  :: SF a b 
      -> SF (Either a c) (Either b c)



Johannes Waldmann 2010-01-25