Re: standard function to change element at list position ?
- From: Jan Wielemaker <jan@xxxxxxxxxxxxxxxxxxx>
- Date: 29 Jun 2006 16:29:59 GMT
On 2006-06-29, none <kaizer@xxxxxxx> wrote:
Hello,
is there a standard function that allows the value at some list position
to be changed by another value?
Examle:
change(List, Number, NewValue, NewList)
change([k, q, u], 3, z, NewList)
NewList would equal [k, q, z]
Not that I'm aware of. In all my years of Prolog programming I've never
had the need to do this. I have the impression you have are using the
wrong representation and you should have been using a compound term or
some array library. Of course it is not hard to write ...
Cheers -- Jan
.
- Follow-Ups:
- References:
- Prev by Date: standard function to change element at list position ?
- Next by Date: Re: standard function to change element at list position ?
- Previous by thread: standard function to change element at list position ?
- Next by thread: Re: standard function to change element at list position ?
- Index(es):