Skip to content

Commit 330e4b0

Browse files
committed
work around #334 in definition of allperms
1 parent ecb3395 commit 330e4b0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

theories/algebra/Perms.ec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ require import AllCore List IntDiv Binomial Ring StdOrder.
55
(* -------------------------------------------------------------------- *)
66
op allperms_r (n : unit list) (s : 'a list) : 'a list list =
77
with n = [] => [[]]
8-
with n = x::n => flatten (
9-
map (fun x => map ((::) x) (allperms_r n (rem x s))) (undup s)).
8+
with n = x::n => (fun rec => flatten (
9+
map (fun x => map ((::) x) (rec (rem x s))) (undup s))) (allperms_r n).
1010

1111
op allperms (s : 'a list) = allperms_r (nseq (size s) tt) s.
1212

0 commit comments

Comments
 (0)