designing data types
curried function