Difference between revisions of "User:Lenny222/Haskell explained to the busy"
Jump to navigation
Jump to search
(→Syntax) |
|||
Line 26: | Line 26: | ||
|"'''$'''" is just a way to avoid typing too many brackets. |
|"'''$'''" is just a way to avoid typing too many brackets. |
||
For example: |
For example: |
||
− | <haskell>h (g (f x)) |
+ | <haskell>h (g (f x))</haskell> |
− | </haskell> |
||
is the same as |
is the same as |
||
− | <haskell> |
+ | <haskell>h $ g $ f x</haskell> |
− | h $ g $ f x |
||
− | </haskell> |
||
|- |
|- |
||
|What is '''point-free style'''? |
|What is '''point-free style'''? |
||
Line 38: | Line 35: | ||
|What is the meaning of the dot "'''.'''"? |
|What is the meaning of the dot "'''.'''"? |
||
|"'''.'''" is used in point-free style code similar to "$". |
|"'''.'''" is used in point-free style code similar to "$". |
||
− | For example: |
+ | For example: |
+ | <haskell>foo x = h (g (f x))</haskell> |
||
+ | is the same as |
||
+ | <haskell>foo x = h $ g $ f x</haskell> |
||
+ | is the same as |
||
+ | <haskell>foo = h . g . f</haskell> |
||
|} |
|} |
Revision as of 09:59, 29 September 2009
You have heard about Haskell but can not afford to spend much time to find out what it is?
I hope this page will be for you.
Introduction
Question | Answer |
---|---|
What is Haskell? | TODO |
Why is it named Haskell? | Haskell is named after the American mathematician Haskell Curry |
Syntax
Question | Answer |
---|---|
What is the meaning of the dollar sign "$"? | "$" is just a way to avoid typing too many brackets.
For example: h (g (f x))
is the same as h $ g $ f x
|
What is point-free style? | Point-free style is another way to define TODO |
What is the meaning of the dot "."? | "." is used in point-free style code similar to "$".
For example: foo x = h (g (f x))
is the same as foo x = h $ g $ f x
is the same as foo = h . g . f
|