last day (15 days later) » 

4:34 PM
oh you showed up! Hi there
Thanks for dropping in
 
Hello
 
so this is what I have so far, I feel like I'm pretty close but not quite there yet
(require racket/trace)
; remove-duplicates is a built-in function in Racket
(define (insert-everywhere sym lst)
(trace-let insert-aux ([l (reverse lst)] [cur '()] [results (list (list sym))])
(if (empty? l)
(reverse results)
(let ([c (cons (car l) cur)])
(insert-aux (cdr l) c results)))))
1 sec I'll try to find better formatting
better formatting: ideone.com/XDfIKO
I can't figure out how to add things to results to get the format you have
 
You are not updating your results.
 
yeah I know, I only was getting the recursion working
I don't know how to update results lol
 
So Imagine you should do something like (cons (list* sym c) (map (lambda (r) (cons a r) results) where a is (car l). You can have it in the same let binding as the other one.
 
4:46 PM
that worked!
now I just need to get the sublist part
 
It does not fix the sublists
 
right
Thank you for all your help, I will try to do the rest myself
I really appreciate it!
 
You're welcome.
 

last day (15 days later) »