Ticket #3703: breakOn.hs

File breakOn.hs, 228 bytes (added by nomeata, 5 years ago)

samle code

Line 
1import qualified Data.ByteString.Char8 as B
2
3main = do
4        let string1 = B.pack "This is a string"
5        let string2 = B.pack "This is another string"
6        print (breakOn ' ' string1)
7        print (breakOn ' ' string2)
8
9breakOn c = B.break (c==)