[erlang-questions] second try for understanding recursion
Sun Feb 8 12:34:56 CET 2015
I thought you already completed this exercise ?
Have you started reading the book I hinted about?
> On 8 feb 2015, at 10:48, Roelof Wobben <r.wobben@REDACTED> wrote:
> I have studied recursion the last few weeks by using Haskell and I think I understand it.
> I did a portion of this exercise :
> Write a module boolean.erlthat takes logical expressions and Boolean values (represented as the atoms trueand false) and returns their Boolean result. The functions
> you write should include b_not/1, b_and/2, b_or/2, and b_nand/2. You should not use
> the logical constructs and, or, and not, but instead use pattern matching to achieve your
> so far I have this :
> % if a empty string is given , the answer will be a empty string.
> b_not('') ->
> % is false is given, the answer will be true.
> b_not(false) ->
> % is true is given, the answer will be false
> b_not(true) ->
> Is this a good try or can I change anything ?
> erlang-questions mailing list
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
More information about the erlang-questions