|
|
| Author |
Message |
|
| tobbe |
Posted: Wed Oct 25, 2006 9:23 pm |
|
|
|
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 |
| Description: |
|
 Download |
| Filename: |
streams.erl |
| Filesize: |
2.5 KB |
| Downloaded: |
1386 Time(s) |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
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
|
|
|