-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Oskar Wickström
committed
Jan 24, 2016
1 parent
ab88d30
commit b18d9e9
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
layout: post | ||
title: Type Signatures | ||
date: 2016-01-24 16:00:00 +0100 | ||
author: Oskar Wickström | ||
categories: compiler | ||
comments: true | ||
--- | ||
|
||
In the spirit of making Oden code more understandable and to help the developer | ||
writing the code, support for type signatures has been added in [Oden | ||
0.2.1-RC1](#). They are optional but recommended to use. | ||
|
||
{% highlight clojure %} | ||
(: identity (int -> int)) | ||
(def (incr n) (+ n 1)) | ||
|
||
(: twice ((#a -> #a) -> (#a -> #a))) | ||
(def (twice f x) (f (f x))) | ||
|
||
(: two int) | ||
(def two (twice incr 0)) | ||
{% endhighlight %} | ||
|
||
If you find any issues please [report them on GitHub](https://github.com/oden-lang/oden/issues). |