Last active
August 29, 2015 14:11
-
-
Save clarkware/c60096ebad9947b77146 to your computer and use it in GitHub Desktop.
Hello, Elm
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
import Text (..) | |
import String (..) | |
import Color (..) | |
import Graphics.Element (..) | |
import Graphics.Collage (..) | |
greet name age = | |
plainText ("Hello, " ++ name ++ "! You don't look " ++ toString(age) ++ "!") | |
add x y = x + y | |
square n = n * n | |
main = collage 250 250 [ | |
filled lightPurple (rect 65 65), | |
toForm (image 50 50 "http://clarkware.com/images/mike.png"), | |
move (25, -60) | |
(alpha 0.5 (toForm (greet (reverse "ekiM") (square (add 10 8))))) | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment