I tried to parallelize the following code: '(let N 2 (while (> 10000000 N ) (check N) (inc 'N))) where (check N) is defined as '(ifn (= N (apply '* (prime-factors N))) (print N))
'later has the following form '(later place_where_to_save_the_return_result . program to execute) However i am not interested in storing the result and (later 'NIL prog) does not work for obvious reasons. Furthermore (later (new) (print 8)) does not work either. Using files as in (out "+file" (later (new) (print 8))) does not work either. Is there a way to run '(check N) on multiple cores at the same time and get the results 'print-ed in to the standard output of the instance where the process was created or in a file which was opened by it (without reopening the file before each in print in the child process)?