Ascend FD-23R Manual de usuario Pagina 81

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 81
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 80
69
transpose = foldr
auxForTranspose
[]
%where
auxForTranspose Xs Xss = zipWith (:) Xs (Xss ++ repeat [])
%% (\\) is used to remove the first occurrence of each element in the second
%% list from the first list. It is a kind of inverse of (++) in the sense
%% that (xs ++ ys) \\ xs = ys for any finite list xs of proper values xs.
infix 50 \\
(\\) :: [A] -> [A] -> [A]
(\\) = foldl del
%where
[] ‘del‘ Y = []
[X|Xs] ‘del‘ Y = if X == Y then Xs
else [X|Xs] ‘del‘ Y
Vista de pagina 80
1 2 ... 76 77 78 79 80 81

Comentarios a estos manuales

Sin comentarios