[erlang-questions] or?

Circular Function circularfunc@REDACTED
Wed Jun 18 18:44:32 CEST 2008


if i instead of :

fib(N) ->
        if
                N > 1 ->
                        fib(N-1) + fib(N-2);
                N == 1 ->
                        1;
                N == 0 ->
                        0
        end.

want to do:

fib(N) ->
        if
                N > 1 ->
                        fib(N-1) + fib(N-2);
                N == 1 or N == 0 ->
                        N
        end.

it doenst work, how do i use or?
http://www.erlang.org/doc/reference_manual/part_frame.html
doesnt provide an actual example of how to use it.



      __________________________________________________________
Ta semester! - sök efter resor hos Yahoo! Shopping.
Jämför pris på flygbiljetter och hotellrum här:
http://shopping.yahoo.se/c-169901-resor-biljetter.html?partnerId=96914052
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080618/6189286d/attachment.htm>


More information about the erlang-questions mailing list