We have been taught that FANBOYS (for, and, nor, but, or , yet, so) are used to make a compound sentence. At the same time, 'for' and 'so' are also used in a complex sentence as subordinator.
1. The rain has stopped, so she has gone for a walk.
2. I lent him money, for he needed it. ( 'for' for reason)
I would like to know whether the above sentences are compound sentences or complex.
Could anyone explain the dual role of these two conjunctions?