Menu

#7 forall_do does not work with complex conditions

open
TIS (4)
5
2004-02-02
2004-02-02
No

Complex conditions (e.g A and B) as first argument of
forall_do operation results in the update (in the
second argument) only being applied once, even if there
are several matches.

(from GoDiS:)
| ?-
apply_update(/private/nim:=oqueue([pair(usr,answer(london)),
pair(usr,answer(paris)), pair(usr,answer(seattle))])).
yes
% source_info
| ?- apply_update(forall_do( (in( $/private/nim,
_Answer) and _Answer/snd = answer(_)), del(
/private/nim, _Answer ) )).
yes

Only two answers have been removed.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB