[Haskell-cafe] separate input calculation output

Claude Heiland-Allen claudiusmaximus at goto10.org
Tue Mar 25 11:59:13 EDT 2008


Thomas Engel wrote:
>> inputvalues :: IO Input     -- add a "return (ve,de,...)" to the end
>> compute :: Input -> Output
> 
> How can I combine several function (calculations) in this function?

compute1 :: Input -> Output1
compute2 :: Input -> Output2
combine :: Output1 -> Output2 -> Output

compute input = combine c1 c2
   where
     c1 = compute1 input
     c2 = compute2 input

etc


Claude
-- 
http://claudiusmaximus.goto10.org



More information about the Haskell-Cafe mailing list