Pronunciation
From HaskellWiki
(Difference between revisions)
(grouping is inconvenient to say) |
m (correct spelling) |
||
| Line 7: | Line 7: | ||
{| | {| | ||
! Symbol | ! Symbol | ||
| - | ! | + | ! Pronunciation |
|- | |- | ||
| <hask> :: </hask> | | <hask> :: </hask> | ||
| Line 75: | Line 75: | ||
{| | {| | ||
! Example | ! Example | ||
| - | ! | + | ! Pronunciation |
|- | |- | ||
| <hask>f :: Int -> Int</hask> | | <hask>f :: Int -> Int</hask> | ||
Revision as of 23:49, 8 January 2008
Some notes for beginners on how to pronounce those strange Haskell operators etc.
This is just a rough start to this page. Obviously needs more work.
This can be a table with formal and informal ways of saying various operators and code snippets such as
| Symbol | Pronunciation |
|---|---|
| :: | has type (in definitions); at type (in expressions or patterns) |
| -> | maps to, to |
| = | is |
| == | equals |
| /= | not-equals |
| => | is a witness for, implies |
| . | dot (could be used anywhere, but especially in, for example, Data.Char.ord), ring, compose (for example, negate . (+1)), (silent) (for example, forall a. (Num a) => a) |
| <- | drawn from, from |
| -< | |
| ++ | append |
| >>= | bind |
| >> | then |
| \ | lambda |
| ! | bang; strict (in patterns or data definitions); index (in expressions) |
| ~ | irrefutable, lazy (in patterns) |
| : | cons |
| [] | nil |
| () | unit |
| (,) | 2-tuple, pair |
| (a,b,c) | [3-]tuple [of] a, b, and c |
| ({)} | just as inconvenient to convey grouping verbally, whether it's layout or punctuation |
| Example | Pronunciation |
|---|---|
| f :: Int -> Int | f has type Int to Int |
should we add informal, possibly bad suggestions like "then", "is", "gets"?
