Implemented 'cast' operator

Hi,

I used 'map' to implement the 'cast' operator #26. Please take a look. Thanks!