Multiple curves join and orient by tangents

I want to convert this simple grasshopper script that joins two curves to eachother and orients them by their tangent vectors to GhPython or C# code however the script is only joining two curves to eachother, I would like to join for instance 10 curves to eachother (order of curves doesn’t matter).
Any help is appreciated.

Thanks in advance. (17.3 KB)

fun exercise
i’m keeping this for myself too
may come in handy