1:- module(canny_pop, 2 [ pop_lsbs/2 % +A:nonneg,-L:list 3 ]).
domain_error(not_less_than_one, A)
13pop_lsbs(0, []) :- !. 14pop_lsbs(A, [H|T]) :- 15 H is lsb(A), 16 B is A /\ \(1 << H), 17 pop_lsbs(B, T)