Hello! Type checker returns an error while translating this piece of code:
(: permutations ((Listof Index) -> (Listof (Listof Index)))) (define (permutations lst) (cond [(empty? lst) '(())] [else (for*/list: : (Listof (Listof Index)) ([x : Index (in-list lst)] [y : (Listof Index) (in-list (permutations (remq x lst)))]) (cons x y))])) 'Type Checker: Error in macro expansion -- insufficient type information to typecheck. please add more type annotations in: (for*/list: : (Listof (Listof Index)) ((x : Index (in-list lst)) (y : (Listof Index) (in-list (remq x lst)))) (cast (cons x y) (Listof Index)))' Is it possible to give more type annotations in this case? Sergey Samoylenko. ____________________ Racket Users list: http://lists.racket-lang.org/users