Last active
September 29, 2016 09:56
-
-
Save deepak/ed5e3c99a889c78a247ca60cd5581d56 to your computer and use it in GitHub Desktop.
trying elm
This file contains hidden or 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
foo = 10 | |
((-) foo 1) | |
((-) 1 foo) | |
-- derived type | |
-- cmd1 : a -> number | |
cmd1 = \op -> ((-) foo 1) | |
cmd1 (-1) -- 9 | |
-- derived type. | |
-- do not understand how this came up ? | |
-- am i doing this right ? | |
-- expected cmd2 to be a infix version of cmd1 which is infix | |
-- cmd2 : (number -> number' -> a) -> a | |
cmd2 = \op -> (1 `op` foo) | |
-- does not work | |
-- TYPE MISMATCH --------------------------------------------- repl-temp-000.elm | |
-- You are giving 2 arguments to something that is not a function! | |
-- 5| 1 op foo) | |
-- ^^^^^^ | |
-- Maybe you forgot some parentheses? Or a comma? | |
-- cmd3 = \op -> (1 op foo) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment