mirror of
https://github.com/janishutz/eth-summaries.git
synced 2026-03-14 10:50:05 +01:00
12 lines
331 B
Haskell
12 lines
331 B
Haskell
-- Declaring a function. Naming using lowerCamelCase
|
|
-- Arguments separated by whitespace
|
|
myFunc :: Int -> Int -> Int
|
|
myFunc x y
|
|
| x > 0 = x + y
|
|
| x < 0 = -x + y
|
|
|
|
-- On compile the above function is transformed like this:
|
|
-- TODO: Transform the template into correct version
|
|
myFuncXCompiled :: Int -> Int
|
|
myFuncXCompiled x = x
|