Skip to content

Quick example on how to use Cats.IO effects and pure functions to calculate costs of customers on their phone bill

Notifications You must be signed in to change notification settings

IgorCandido/phone-company-exercise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phone Company

Each day at The Phone Company a batch job puts all the customer calls for the previous day into a single log file of:

'customer id','phone number called','call duration'

For a customer the cost of a call up to and including 3 minutes in duration is charged at 0.05p/sec, any call over 3 minutes in duration the additional time is charged at 0.03p/sec. However, there is a promotion on and the calls made to the phone number with the greatest total cost is removed from the customer's bill.

Exercise

Parse the calls.log file and print out the total cost of calls for the day for each customer.

About

Quick example on how to use Cats.IO effects and pure functions to calculate costs of customers on their phone bill

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages