Fixed some issue with the concat operation. Added flatten, toMap, fold,
foreach and reverse operations.