Skip to content

Instantly share code, notes, and snippets.

@sharkdp
Created February 8, 2016 22:14
Show Gist options
  • Save sharkdp/9a64723682c8cfeb2a5a to your computer and use it in GitHub Desktop.
Save sharkdp/9a64723682c8cfeb2a5a to your computer and use it in GitHub Desktop.
Celsius to Fahrenheit (small)
<!DOCTYPE html>
<html>
<head>
<link href="css/style.css" rel="stylesheet">
</head>
<body>
<div id="controls"></div>
<div id="output"></div>
</body>
</html>
module Main where
import Prelude
import Flare
celsius = number "Celsius" 0.0
convert c = "Fahrenheit: " <> show (c * 9.0 / 5.0 + 32.0)
main = runFlare "controls" "output" (map convert celsius)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment