while/3 is an Erlang function exported by "age_lists" module. Compares the Pattern with each element Item in List, and then calls Fun(Item). The function exists when the Pattern is matching with the Item. The function returns list of results from the Fun calls. Fun(Item) could return any value, or: •break - will cause exit from the loop immediately. •continue - will skip the iteration and move to the next one. |
|
|