Re: how to make a list of N 1s
- From: "erhan" <eerisken@xxxxxxxxxx>
- Date: 26 Apr 2006 06:55:41 -0700
makeN1(N, L) :-
N == 0, !,
L = []
;
N1 is N - 1,
L = [1 | Tail],
makeN1(N1, Tail).
.
- Follow-Ups:
- Re: how to make a list of N 1s
- From: Markus Triska
- Re: how to make a list of N 1s
- References:
- how to make a list of N 1s
- From: erhan
- how to make a list of N 1s
- Prev by Date: Re: argument order in last/2
- Next by Date: Flailing Fish in Need Of Rescue
- Previous by thread: how to make a list of N 1s
- Next by thread: Re: how to make a list of N 1s
- Index(es):