Skip to content

Commit b18d9e9

Browse files
author
Oskar Wickström
committed
Add blog post about type signatures
1 parent ab88d30 commit b18d9e9

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
layout: post
3+
title: Type Signatures
4+
date: 2016-01-24 16:00:00 +0100
5+
author: Oskar Wickström
6+
categories: compiler
7+
comments: true
8+
---
9+
10+
In the spirit of making Oden code more understandable and to help the developer
11+
writing the code, support for type signatures has been added in [Oden
12+
0.2.1-RC1](#). They are optional but recommended to use.
13+
14+
{% highlight clojure %}
15+
(: identity (int -> int))
16+
(def (incr n) (+ n 1))
17+
18+
(: twice ((#a -> #a) -> (#a -> #a)))
19+
(def (twice f x) (f (f x)))
20+
21+
(: two int)
22+
(def two (twice incr 0))
23+
{% endhighlight %}
24+
25+
If you find any issues please [report them on GitHub](https://github.com/oden-lang/oden/issues).

0 commit comments

Comments
 (0)