make sample program using cons function