about summary refs log tree commit diff stats
path: root/html/f2c-2.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-03-08 16:39:42 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-03-08 16:39:42 -0800
commitabe78a52c3848b903b664da0ad1e5705ec379e63 (patch)
tree7c4fcf802f8d010bd74919abd98dfc8813c6aeb9 /html/f2c-2.mu
parent9ba232fa0a3e64f14273249632ca561b59a91026 (diff)
downloadmu-abe78a52c3848b903b664da0ad1e5705ec379e63.tar.gz
2740
Diffstat (limited to 'html/f2c-2.mu')
-rw-r--r--html/f2c-2.mu9
1 files changed, 9 insertions, 0 deletions
diff --git a/html/f2c-2.mu b/html/f2c-2.mu
new file mode 100644
index 00000000..ded2a640
--- /dev/null
+++ b/html/f2c-2.mu
@@ -0,0 +1,9 @@
+# c = (f-32) * 5/9
+def fahrenheit-to-celsius [
+  local-scope
+  f:number <- next-ingredient
+  tmp:number <- subtract f, 32
+  tmp <- multiply tmp, 5
+  c:number <- divide tmp, 9
+  return c
+]