Hoare, Communicating Sequential Processes, and JCSP

Shawn Pearce spearce@REDACTED
Tue Feb 11 20:45:43 CET 2003


What about:

foo(A, B) when A < B ->
	B;
foo(_, _) ->
	false.

would be:

	if .. then ...
	else ...
	end.

:-)

Joe Armstrong <joe@REDACTED> wrote:
> Thus
> 	if .... then ...
> 	elseif ... then ...
> 	elseif ... then ...
> 	end.
> 
> Is OK, but adding an else
> 
> 	if .... then ...
> 	elseif ... then ...
> 	elseif ... then ...
> 	else ...
> 	end.
> 
> Is not
> 
> And thus it was in Erlang 
> 
> Dijkstra's guarded commands are a direct antecenent to multiple entry
> points to a function.

-- 
Shawn.




More information about the erlang-questions mailing list