Created
November 19, 2009 08:47
-
-
Save ato/238648 to your computer and use it in GitHub Desktop.
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
| (defproject org.clojars.ato/too-hot "1.0.0" | |
| :description "A very simple Fahrenheit to Celsius converter." | |
| :dependencies [[org.clojure/clojure "1.1.0"]] | |
| :dev-dependencies [[lein-clojars "0.5.0"]]) |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>too-hot</groupId> | |
| <artifactId>too-hot</artifactId> | |
| <version>1.0.0</version> | |
| <name>too-hot</name> | |
| <description>A very simple Fahrenheit to Celsius converter.</description> | |
| <url>http://wiki.github.com/ato/clojars-web/tutorial</url> | |
| <dependencies> | |
| <dependency> | |
| <groupId>org.clojure</groupId> | |
| <artifactId>clojure</artifactId> | |
| <version>1.1.0</version> | |
| </dependency> | |
| </dependencies> | |
| </project> |
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
| (defproject too-hot "1.0.0" | |
| :description "A very simple Fahrenheit to Celsius converter." | |
| :dependencies [[org.clojure/clojure "1.1.0"]] | |
| :dev-dependencies [[lein-clojars "0.5.0"]]) |
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
| (ns too-hot) | |
| (defn celsius | |
| "Converts a temperature in Fahrenheit to Celsius." | |
| [f] | |
| (* (- f 32) 5/9)) | |
| (defn fahrenheit | |
| "Converts a temperature in Celsius to Fahrenheit." | |
| [c] | |
| (+ (* c 9/5) 32)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment