Code segments for illustration purposes