All pastes #193339 Raw Edit

Someone

public text v1 · immutable
·published 2006-10-06 19:51 UTC
rendered paste body
----
venderEntradaT :: Teatro -> Entrada -> Teatro
venderEntradaT (Tea sala funcion estable sueldo entradas) e = Tea sala funcion estable sueldo (e:entradas)

-----
costoDeUnaFuncionT :: Teatro -> Funcion -> Moneda
costoDeUnaFuncionT t f = calcularcosto t f

calcularcosto :: Teatro -> Funcion -> Moneda
calcularcosto t f = (sumarSueldoEstablesDe t (elenco f)) + (sumarSueldosContratados f (contratadosF f))

sumarSueldoEstablesDe :: Teatro -> [Nombre] -> Moneda
sumarSueldoEstablesDe t [] = 0
sumarSueldoEstablesDe t (x:[]) = SueldoT t x
sumarSueldoEstablesDe t (x:xs) = (SueldoT t x) + (sumarSueldoEstablesDe t xs)

sumarSueldosContratados :: Funcion -> [Nombre] -> Moneda
sumarSueldosContratados f [] = 0
sumarSueldosContratados f (x:[]) = cachetF f x
sumarSueldosContratados (x:xs) = (cachetF f x) + (sumarSueldosCon