first draft

I'm not sure wether it's better to make contrib stuff by composition or iterative implementation.
Also haven't made tests yet since this is a first draft.

R.align may not be strictly "functional" style, but at least it doesn't mutate the arrays :smile: