mark.warren
2019-1-21 15:13:39

Ugh, my brain has fogged over, can someone remind me how to collapse a list of lists into a single list containing the contents of all the lists?


soegaard2
2019-1-21 15:14:21

flatten ?


mark.warren
2019-1-21 15:14:32

Never mind I think I’ve just remembered a way (foldl append '() '((2 5 8) (1 3 10)))


mark.warren
2019-1-21 15:20:19

@soegaard2 Thanks, flatten does indeed work and is tidier than my solution.


aqazi786
2019-1-21 21:04:24

Thanks @philip.mcgrath for taking the thoroughly commented alternate solution. Especially for explaining the idea behind the helper function. This is extremely helpful in growing my understanding of Racket / Scheme.