#haskell - Thu 22 Feb 2007 between 00:00 and 00:06



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"
slowriotso if you call map on a string separated by newlines, it will consider it a list of lines?
maukeno
slowriotoh
ddariusslowriot: Haskell doesn't do magic.
fuzan:t lines
lambdabotString -> [String]
slowriot> words "a b c\n d e f\ng h i\n"
CaleIt considers \n whitespace though, if that helps.
donsprint . 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"]
glguyhaskell is strongly typed
none of that perl non-sense
LoganCapaldoimport Data.Dynamic
maukeperl is strongly typed, too!
LoganCapaldohahaha, only kidding
glguylol
maukekeys @foo is a compiler error, for example
glguyLoganCapaldo: Data.Dynamic doesn't make the types any less strong :-p
LoganCapaldoLooks like a syntax error ;)
glguymauke: lol, until "1" + 2 doesn't work
LoganCapaldosince keys is a builtin
glguyit's not strongly typed
hpastesjanssen annotated "derivation of (.) (.) (.)" with "use Haskell to check each step of your proof" at http://hpaste.org/578#a4
maukeglguy: depends on your definition of "strongly typed"
Caleglguy: hehe, instance Num String where ...
glguyCale: what would that change?
CaleIt would make "1" + 2 work in Haskell.
glguyhow?
LoganCapaldoit would?
CaleYes, of course.
glguybecause fromIntegral 2?

Page: 2 9 16 23 30 37 44 51 58 65 72 79 86 93 100 107 114 

IrcArchive