babble(NumberOfTimes) -> [spawn(fun() -> count(N) end) || N <- lists:seq(1, NumberOfTimes)]. 1> c(example3). {ok,example3} 2> example3:babble(100). [<0.38.0>,<0.39.0>,<0.40.0>,<0.41.0>,<0.42.0>,<0.43.0>, <0.44.0>,<0.45.0>,<0.46.0>,<0.47.0>,<0.48.0>,<0.49.0>, <0.62.0>,<0.63.0>,<0.64.0>,<0.65.0>,<0.66.0>|...] The number is 4 The number is 3 The number is 2 The number is 1 The number is 56 The number is 61 The number is 55 Friday, April 5, 13
3> gen_server:call(example5, "Hello, there"). Received call from {<0.31.0>,#Ref<0.0.0.77>}: "Hello, there" "Thanks for playing" 4> gen_server:cast(example5, {foo, 5}). ok Received cast: {foo,5} Friday, April 5, 13