suonare in giro per ghci
ho ottenuto la seguente espressione: unlines . map (\(a,b) -> show a ++ " " ++ show b)
Perché il cambiamento della firma, dopo un incarico
Ora quando posso controllare tramite :t
ottengo:
> :t unlines . map (\(a,b) -> show a ++ " " ++ show b)
unlines . map (\(a,b) -> show a ++ " " ++ show b)
:: (Show a, Show a1) => [(a, a1)] -> String
Quindi, esattamente come previsto. Ma ora se cerco di assegnarlo a un nome, ho una firma più specifica quello originario:
> let f = unlines . map (\(a,b) -> show a ++ " " ++ show b)
> :t f
f :: [((),())] -> String
Perché accade questo?
Vedere anche: [1] (http://stackoverflow.com/questions/7055146), [2] (http://stackoverflow.com/questions/11439163), [3] (http: // stackoverflow. it/questions/9714697), [4] (http://stackoverflow.com/questions/8434808), [5] (http://stackoverflow.com/questions/7799345), [6] (http: // stackoverflow .com/questions/8262020), [7] (http://stackoverflow.com/questions/8655900), [8] (http://stackoverflow.com/questions/11003535). Onestamente non sono sicuro di quale (se esiste) di questi per contrassegnare questo un duplicato di. –