Foldable neuromorphic memristive electronics