NahuelMGithub / Estructura-de-Datos

TP's Estructura de Datos Nahuel López
0 stars 0 forks source link

Pr4: `sinRepetirTripulantes` NO ESTÁ hecha por RE #21

Closed fidel-ml closed 2 years ago

fidel-ml commented 2 years ago

Este error es EXACTAMENTE el mismo que corregimos en la Pr3 en clase para sinProyectosRepetidos... :( NO HAY QUE REPETIR LOS MISMOS ERRORES.

NahuelMGithub commented 2 years ago

este lo cambie y tengo duda si esta correción es sobre mi cambio, o el original. Ahora lo hice así:

sinRepetirTripulantes :: [Tripulante] -> [Tripulante] 
sinRepetirTripulantes []      = []
sinRepetirTripulantes (t:ts)  = agregarSiFalta  t (sinRepetirTripulantes ts)

agregarSiFalta :: Tripulante -> [Tripulante] -> [Tripulante]
agregarSiFalta  t ts   = if pertenece t ts
                                   then  ts 
                                   else t :  ts
fidel-ml commented 2 years ago

Esta ahora está bien. Pero si mirás en el repo, no es lo que dice...

NahuelMGithub commented 2 years ago

tal vez no lo había subido, pero es el que tiene.