[Haskell-cafe] Fucntion composing
Henning Thielemann
schlepptop at henning-thielemann.de
Wed Apr 13 23:30:16 CEST 2011
Adam Krauze schrieb:
> Hello,
> as I am newbie to Haskell and my introductory question is:
>
> given functions say f and g with type signatures
>
> f :: (Num a) => [a] -> [a] -> [(a,a)] // f takes two lists and zips them into one in some special way
> g :: (Num a) => a -> [(a,a)] -> [a] // g using some Num value calculates list of singletons from list of pairs
>
> of course g 0 :: (Num a) => [(a,a)] ->[a]
>
> now I want to create function h :: (Num a) => [a] -> [a] -> [a] in such way
>
> that (g 0) consumes output of f.
>
> But when I try
>
> Prelude> :t (g 0).f
http://www.haskell.org/haskellwiki/Composing_functions_with_multiple_values
More information about the Haskell-Cafe
mailing list