Valkertown Blog

I used to write about electronics…

Valkertown Blog header image 5

Entries from March 18th, 2009

Writting Circular Lists in Erlang

March 18th, 2009 Comments

Well I have been struggling to find/create a circular buffer(list to be exact) on erlang, but I’m still not satisfied, I have hacked this:

[_P | T ] = lists:reverse(O),

    N = [ V | lists:reverse(T)],

To insert V in the head and remove P from the tail. But can you see the problem with that: [...]

Tags:   ·