Last active
September 27, 2019 06:56
-
-
Save boombang/fb43ae399d277646309a85bea3e9e024 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add : Int -> Int -> Int | |
add a b = | |
a + b | |
addOne : Int -> (Int -> Int) | |
addOne a = | |
add 1 | |
two = | |
addOne 1 | |
multiply : Int -> Int -> Int | |
multiply a b = | |
a * b | |
divide : Int -> Int -> Int | |
divide a b = | |
a // b | |
q = | |
Html.text (String.fromInt (add 5 (multiply 10 (divide 30 10)))) | |
-- x |> f = f x | |
w = | |
divide 30 10 | |
|> multiply 10 | |
|> add 5 | |
|> String.fromInt | |
|> Html.text | |
-- f <| x = f x | |
e = | |
Html.text <| String.fromInt <| add 5 <| multiply 10 <| divide 30 10 | |
infixStyle = | |
2 + 5 | |
prefixStyle = | |
add 2 5 | |
operatorPrefixStyle = | |
(+) 2 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment