Skip to content

Instantly share code, notes, and snippets.

@ato
Created November 19, 2009 08:47
Show Gist options
  • Select an option

  • Save ato/238648 to your computer and use it in GitHub Desktop.

Select an option

Save ato/238648 to your computer and use it in GitHub Desktop.
(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"]])
<?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>
(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"]])
(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