Retourner au contenu associé (entrée de forum : PROBLEME AVEC LA COMMANDE AWK)
Posté par max22 le 05 septembre 2014 à 18:20. En réponse au message PROBLEME AVEC LA COMMANDE AWK. Évalué à 1. Dernière modification le 05 septembre 2014 à 18:20.
Je suis complètement hors sujet, mais comme j'apprends le haskell en ce moment je m'entraîne :
import Control.Applicative import qualified Data.Map as Map import Data.List main = do contents <- (Map.toList . Map.fromListWith (+) . map (myRead . words) . lines) <$> readFile "y.txt" putStrLn . concat . intersperse "\n" . map (\(x,y) -> x ++ " " ++ show y) $ contents where myRead [a, b] = (a, (read b)::Int)
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
# HS
Posté par max22 . En réponse au message PROBLEME AVEC LA COMMANDE AWK. Évalué à 1. Dernière modification le 05 septembre 2014 à 18:20.
Je suis complètement hors sujet, mais comme j'apprends le haskell en ce moment je m'entraîne :