[Haskell-cafe] Order of Declaration

Derek Elkins derek.a.elkins at gmail.com
Sat Sep 29 13:05:01 EDT 2007


On Sat, 2007-09-29 at 17:58 +0100, PR Stanley wrote:
> 	Hi
> in C type languages a function must be declared before its application.
> Would I be right in thinking that this isn't the case in Functional languages?
> For example:
> transmit :: String -> String
> transmit = decode . channel . encode
> channel :: [[Int]] -> [[Int]]
> channel = id

It's not the case in Haskell.  Not only is the above valid, but so is:

transmit = decode . channel . encode

channel :: [[Int]] -> [[Int]]

transmit :: String -> String 

channel = id



More information about the Haskell-Cafe mailing list