Memoize Erlang function calls

| | Comments (1) | TrackBacks (0)

The Erlang workshop has been a blast so far. Just wrote this quick snippet to memoize Erlang function calls. Enjoy!

Using it is pretty simple. Just start the memoize server and then send mfas to it.

1> memoize:start().
2> memoize:memoize(fun module:function/0, [Arguments]).

0 TrackBacks

Listed below are links to blogs that reference this entry: Memoize Erlang function calls.

TrackBack URL for this entry: http://admin.socklabs.com/mt-tb.cgi/2130

1 Comments

evgen said:

You might want to add some sort of expiration or LRU feature to the memoization cache or you could end up eating up a lot of memory...

Leave a comment

About this Entry

This page contains a single entry by Nick Gerakines published on September 27, 2008 10:01 AM.

facebook_wiiinfo, an open source Facebook application was the previous entry in this blog.

Erlang is Delicious, CUFP slides is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.