[Haskell-beginners] code explanation

moowoo9 at fastmail.fm moowoo9 at fastmail.fm
Sat Jul 2 18:47:33 CEST 2011


I'm a beginner, I'd like someone to help me understand a few
lines of code
My questions are:
1) Maybe String is an application of the constructor Maybe to the
type String.
What does it mean? Is there anything equivalent in the C
language?
2) Is this a function with three arguments?
type T = [Char]
type P = (Char, Maybe String)
type Delta = ((Maybe Char, Char), Maybe String)
fromGtoM :: T -> [P] -> [Delta]
3) is this a usage of the above mentioned function?
fromGtoM t p = terminalRules ++ varRules
I dont'see why the function has three arguments but then only
two are used t p.
4) what does ++ mean ?

Sorry, for posting too many questions.
Thanks in advance.
--

moowoo9 at fastmail.fm

-- 
http://www.fastmail.fm - Access your email from home and the web

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20110702/1f89bd55/attachment.htm>


More information about the Beginners mailing list