DEV Community

Discussion on: Daily Coding Puzzles - Nov 11th - Nov 16th

Collapse
 
sdicke profile image
Sebastian Martin Dicke • Edited

Haskell solution:

transportation_on_vacation :: Int -> Int
transportation_on_vacation days
    | days > 6 = max_costs - 50
    | days > 3 = max_costs - 20
    | otherwise = max_costs
    where
    max_costs = 40 * days