Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rustkas/erlang_master_class

Notes related to master class material
https://github.com/rustkas/erlang_master_class

erlang masterclass notes

Last synced: 19 days ago
JSON representation

Notes related to master class material

Awesome Lists containing this project

README

        

# [Erlang master class](https://www.kent.ac.uk/elearning/themes/masterclasses.html) notes

Lifehacks of practical usage source code examples.

## Master class 2

`demo2.erl`
```
% testing source code by any input (without hanging)
% pay attention to usage of function f(). It remove variable `Replay` from process memory

Pid1 = spawn(demo2, area, []).
Pid1 !{self(), {square, 20}}, f(Reply), receive Reply -> Reply end.
Pid1 !{self(), {square, 30}}, f(Reply), receive Reply -> Reply end.
Pid1 !{self(), {square, 40}}, f(Reply), receive Reply -> Reply end.
Pid1 !{self(), {square, 50}}, f(Reply), receive Reply -> Reply end.
```