[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: reverse
From: |
Alberto Simões |
Subject: |
Re: reverse |
Date: |
Sat, 20 Mar 2010 20:37:48 +0000 |
Hello
I would like to ask a question to dsstester001, now that he has the solution.
Was this any kind of homework?
I ask because it is easy to find this and other solutions anywhere in
the web or in reference books... and because I am a teacher (not of
Prolog) and I wonder if my students annoy people on mailing lists to
answer they homework :)
Cheers
Alberto
On Sat, Mar 20, 2010 at 7:30 PM, Duncan Patton a Campbell
<address@hidden> wrote:
>
> revR([], []).
> revR([H|T], L) :-
> revR1(T, L, [H]).
>
> revR1([], L, L).
> revR1([H|T], L, L1) :-
> revR1(T, L, [H|L1]).
>
> This is just one obvious implementation.
>
> Dhu
>
>
> _______________________________________________
> Users-prolog mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/users-prolog
>
--
Alberto Simões
- reverse, Duncan Patton a Campbell, 2010/03/20
- Re: reverse,
Alberto Simões <=