function totalWithTax(prices: number[], taxRate: number = 0.1): number { const subtotal = prices.reduce((sum, price) => sum + price, 0); return Math.round(subtotal * (1 + taxRate) * 100) / 100; }