[erlang-questions] beginner question
Ron Peterson
rpeterso@REDACTED
Mon Aug 25 04:33:36 CEST 2008
2008-08-17_20:50:24-0400 "Richard A. O'Keefe" <ok@REDACTED>:
> or even
>
> for(LB, UB, Fun) ->
> [Fun(I) || I <- lists:seq(LB, UB)].
>
> Better still, ditch for/3 entirely, and write
> the list comprehension in place.
(Getting back to this after a few days...)
Got it, e.g.
random_tuples( Max, Num ) ->
set_seed_to_now(),
[ random_tuple( Max ) || _ <- lists:seq( 1, Num ) ].
I was playing w/ for/3 mostly as an intellectual excercise. I'm really
very new w/ this. Thanks for the help.
--
Ron Peterson
Network & Systems Manager
Mount Holyoke College
http://www.mtholyoke.edu/~rpeterso
-
I wish my computer would do what I want it to do - not what I tell it to do.
More information about the erlang-questions
mailing list