Re: [Haskell-cafe] take the keywords from a string

2006-06-17 Thread Sara Kenedy
Thanks, I got it and it run sucessfully now. On 6/18/06, Jason Dagit <[EMAIL PROTECTED]> wrote: On 6/17/06, Sara Kenedy <[EMAIL PROTECTED]> wrote: [snip] > > When I try function lisOfString as below, it runs forever (non-stop) > although I have the stop criteria for it ?? The patterns are teste

Re: [Haskell-cafe] take the keywords from a string

2006-06-17 Thread Jason Dagit
On 6/17/06, Sara Kenedy <[EMAIL PROTECTED]> wrote: [snip] When I try function lisOfString as below, it runs forever (non-stop) although I have the stop criteria for it ?? The patterns are tested on a 'first come first served' basis. As your program executes, it tries the first pattern listed,

Re: [Haskell-cafe] take the keywords from a string

2006-06-17 Thread Sara Kenedy
Hi, I tried to write function lexList by using an intermediate function lisOfString as below: module Lex where lexList :: String -> [String] lexList str = listOfString (lex str) lexList [] =[] listOfString :: [(String,String)] -> [String] listOfString [(s1,s2)] = s1: listOfString (lex s2) listO

Re: [Haskell-cafe] take the keywords from a string

2006-06-17 Thread Sara Kenedy
OK, thank you. S. On 6/17/06, Neil Mitchell <[EMAIL PROTECTED]> wrote: Hi On 6/18/06, Sara Kenedy <[EMAIL PROTECTED]> wrote: > Sorry, I am not clear at some point in your answer: > > 1) The function > lex :: String -> [(String,String)] > and > filter :: (a -> Bool) -> [a] -> [a] > So, I did not

Re: [Haskell-cafe] take the keywords from a string

2006-06-17 Thread Neil Mitchell
Hi On 6/18/06, Sara Kenedy <[EMAIL PROTECTED]> wrote: Sorry, I am not clear at some point in your answer: 1) The function lex :: String -> [(String,String)] and filter :: (a -> Bool) -> [a] -> [a] So, I did not see how filter can use the list of tuple string of lex. You can write a function l

Re: [Haskell-cafe] take the keywords from a string

2006-06-17 Thread Sara Kenedy
Sorry, I am not clear at some point in your answer: 1) The function lex :: String -> [(String,String)] and filter :: (a -> Bool) -> [a] -> [a] So, I did not see how filter can use the list of tuple string of lex. Sorry if the question seems ridiculous. Thanks. S. On 6/17/06, Neil Mitchell <[E

Re: [Haskell-cafe] Sets symmetric difference

2006-06-17 Thread Neil Mitchell
Hi, This can quite easily be formulated in terms of union and \\ (set difference), both available in Data.List. Thanks Neil On 6/18/06, Jenny678 <[EMAIL PROTECTED]> wrote: Hello, Know Somebody the code for symmetric difference (Sets) examples >symmetric_difference [1..8][5..7] >[1,2,3,4,8

[Haskell-cafe] Sets symmetric difference

2006-06-17 Thread Jenny678
Hello, Know Somebody the code for symmetric difference (Sets) examples >symmetric_difference [1..8][5..7] >[1,2,3,4,8] >symmetric_ difference [1..8][] >[1,2,3,4,5,6,7,8] >symmetric_ difference [1..12][10..20] >[1,2,3,4,5,6,7,8,9,13,14,15,16,17,18,19,20] Thanks for Help -- View this messa

Re: [Haskell-cafe] take the keywords from a string

2006-06-17 Thread Neil Mitchell
Hi Sara, This function will take the input as a string and return a list of keywords taken from the input string and they are elements of ListOfKeywords. The order of the result list is sequenced as: the last keyword found is set as the first element of the list, and so on. It looks like your

[Haskell-cafe] take the keywords from a string

2006-06-17 Thread Sara Kenedy
Hi everybody, I have a function: takeKeyword :: String -> [String] This function will take the input as a string and return a list of keywords taken from the input string and they are elements of ListOfKeywords. The order of the result list is sequenced as: the last keyword found is set as the

Re: [Haskell-cafe] SMTP, HTTP, Telnet

2006-06-17 Thread S. Alexander Jacobson
HAppS and HaskellNet both have SMTP clients. HAppS focuses more on providing a reliable delivery agent (acting as a relay). I think HaskellNet focuses more on rich client functionality. -Alex- On Fri, 16 Jun 2006, Lyle Kopnicky wrote: Hi all, Anybody know of some good Haskell libraries pr