mirror of
https://github.com/janishutz/eth-summaries.git
synced 2026-03-14 17:00:05 +01:00
[FMFP] Start summary
This commit is contained in:
11
semester4/fmfp/code/00_syntax.hs
Normal file
11
semester4/fmfp/code/00_syntax.hs
Normal file
@@ -0,0 +1,11 @@
|
||||
-- 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
|
||||
Reference in New Issue
Block a user