When starting out with Haskell, I found it difficult to read a lot of the symbols. I made this document explaining the names of some symbols and how I read them.
x :: Int
\ This implements Euclidean algorithm in Forth | |
: gcd ( X Y ) | |
2dup <= if swap ( Y X ) then | |
( X Y ) | |
begin | |
tuck ( Y X Y ) | |
mod ( Y Z ) | |
dup ( Y Z Z ) | |
0= until ( Y Z ) | |
( Y 0 ) |