| Paste number 61520: | Ninjas |
| Pasted by: | nem |
| 6 months, 1 day ago | |
| None | |
| Paste contents: |
| RLoop = fun (F) -> receive hello -> io:format("Got anonymous hello world.~n", []); {hello_from, Sender, please_greet, Who} -> Sender ! "Hello " ++ term_to_list(Who); stop -> exit(bye) end, F(F) end. Greeter = spawn(fun () -> RLoop(RLoop) end). |
Annotations for this paste:
| Annotation number 1: | fixed a bit |
| Pasted by: | nem |
| 6 months, 1 day ago | |
| Paste contents: |
| RLoop = fun (F) -> receive hello -> io:format("Got anonymous hello world.~n", []); {hello_from, Sender, please_greet, Who} -> Sender ! lists:flatten(io_lib:format("Hello ~p", [Who])); stop -> exit(bye) end, F(F) end. Greeter = spawn(fun () -> RLoop(RLoop) end). |
| Annotation number 2: | more fixed |
| Pasted by: | nem |
| 6 months, 1 day ago | |
| Paste contents: |
| RLoop = fun (F) -> receive hello -> io:format("Got anonymous hello world.~n", []); {hello_from, Sender, please_greet, Who} when is_list(Who) -> Sender ! lists:flatten(io_lib:format("Hello ~s", [Who])); {hello_from, Sender, please_greet, Who}h -> Sender ! lists:flatten(io_lib:format("Hello ~p", [Who])); stop -> exit(bye) end, F(F) end. Greeter = spawn(fun () -> RLoop(RLoop) end). |