Erlang Mailing Lists

Author Message

<  User Contributions  ~  streams.erl

tobbe
Posted: Wed Oct 25, 2006 9:23 pm Reply with quote
User Joined: 19 Jan 2005 Posts: 274 Location: Stockholm, Sweden
Just for the fun of it. Here is some very old Erlang code implementing 'streams'. To try it out run for example:
Code:

1> streams:first(10, streams:primes()).
[2,3,5,7,11,13,17,19,23,29]

2> hd(lists:reverse(streams:first(2000, streams:pi()))).
3.14399


--Tobbe



streams.erl
 Description:

Download
 Filename:  streams.erl
 Filesize:  2.5 KB
 Downloaded:  1360 Time(s)

View user's profile Send private message Send e-mail Visit poster's website

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum