| rashakil | > (map head . words) "a b c\nd e f\ng h i\n" |
| lambdabot | "abcdefghi" |
| mauke | > filter (not . isSpace) "a b c\nd e f\ng h i\n" |
| lambdabot | "abcdefghi" |
| slowriot | so if you call map on a string separated by newlines, it will consider it a list of lines? |
| mauke | no |
| slowriot | oh |
| ddarius | slowriot: Haskell doesn't do magic. |
| fuzan | :t lines |
| lambdabot | String -> [String] |
| slowriot | > words "a b c\n d e f\ng h i\n" |
| Cale | It considers \n whitespace though, if that helps. |
| dons | print . map reverse . lines =<< getContents |
| slowriot | > words "a b c\n d e f\ng h i\n" |
| lambdabot | ["a","b","c","d","e","f","g","h","i"] |
| mauke | > join (words "a b c\n d e f\ng h i\n") |
| lambdabot | "abcdefghi" |
| Cale | > words " a b \n c d e f " |
| lambdabot | ["a","b","c","d","e","f"] |
| glguy | haskell is strongly typed none of that perl non-sense |
| LoganCapaldo | import Data.Dynamic |
| mauke | perl is strongly typed, too! |
| LoganCapaldo | hahaha, only kidding |
| glguy | lol |
| mauke | keys @foo is a compiler error, for example |
| glguy | LoganCapaldo: Data.Dynamic doesn't make the types any less strong :-p |
| LoganCapaldo | Looks like a syntax error ;) |
| glguy | mauke: lol, until "1" + 2 doesn't work |
| LoganCapaldo | since keys is a builtin |
| glguy | it's not strongly typed |
| hpaste | sjanssen annotated "derivation of (.) (.) (.)" with "use Haskell to check each step of your proof" at http://hpaste.org/578#a4 |
| mauke | glguy: depends on your definition of "strongly typed" |
| Cale | glguy: hehe, instance Num String where ... |
| glguy | Cale: what would that change? |
| Cale | It would make "1" + 2 work in Haskell. |
| glguy | how? |
| LoganCapaldo | it would? |
| Cale | Yes, of course. |
| glguy | because fromIntegral 2? |