32leaves.net
Cool, you're reading my blog. Hope you like it. You may wanna check my twitter page, too

Y combinator in Scala

This is just a quick post to share this thing with the world: the Y-combinator in Scala (yipee, anonymous recursion). Unfortunately this can’t be written purely as Scala does not employ lazy evaluation (like Haskell does).

1
2
3
4
5
6
7
8
9
object YCombinator {

  def Y[A](f: (A => A) => (A => A)): (A => A) = f(Y(f))(_:A)
 
  def main(args: Array[String]) = {
    println(Y( (fact:(Int => Int)) => (x:Int) => if(x == 0) 1 else x * fact(x - 1) )(5))
  }
 
}

Happy birthday dear blog

I just noticed that I started blogging about a year ago. Actually I just missed the exact day (would have been 21. of July) – but it’s still pretty cool. Within this year 49 posts were written, organized in 68 tags.

Thank you for reading this blog, thus making it not completely useless :)

Wooo, new design, wooo

As you might have noticed my blog has got a new design. I wanted to do this for quite a while now and finally found time and motivation to do this. And I updated by WordPress installation to 2.7 in this process. So if something does not work as well as it used to, please be lenient.

But hey, now there is a cool tag cloud and it became easier to navigate thru the posts.

There’s no place like 127.0.0.1

As I’m going to study at the Hochschule Furtwangen University, I had to get a new place to stay (which is not necesarily something negative, but I also liked the place I lived before :-) )

Here are some pictures of my new flat

All in all, the room is bigger than I thought

LaTeX introduction

Another day, another post. This time its an introduction to LaTeX I’ve written for a seminar I hold in school. It’s written in German, but if you happen to understand that language and want to have look at it, get it here. The zip file includes an article/reference style document, the presentation and an example file to show you what you can do with LaTeX.
The whole work is shared under a Attribution-Noncommercial-No Derivative Works 3.0 Unported licence.

LaTeX intro

LaTeX intro