Change foldl to foldr
Hardcode builting types - gb_set()