[Haskell] First IFCoLog-CIE Student Session

2012-02-13 Thread Pedro Vasconcelos
Dear all, Please advertise among undergraduate and master students involved in research projects related to Computer Science (including but not limited to Haskell projects). Best regards, Pedro Vasconcelos p...@dcc.fc.up.pt - Call for Papers First IFCoLog-CIE Student Session

Re: [Haskell] Re: ST/STRef vs. IO/IORef

2005-08-04 Thread Pedro Vasconcelos
ds: a pure interface and efficiency. I think the Data.Graph algorithms in GHC's libraries are coded in this way. Regards, Pedro -- Pedro Vasconcelos, School of Computer Science, University of St Andrews --- "In theory

Re: [Haskell] Type of y f = f . f

2005-02-28 Thread Pedro Vasconcelos
-> c -> c So it admits principal type (a->a) -> a->a. From this you can see that (y head) and (y fst) cannot be typed, whereas (y id) can. BTW, this function is usually named 'twice'. Best regards, Pedro -- P

Re: [Haskell] [Newbie] Data structure for Dijkstra's algorithm

2005-02-15 Thread Pedro Vasconcelos
u have to traverse a list to find neighbours of a vertex. It is possible to write more efficient representation using references or arrays, but I'd stay away from that until you're more familiar with the language. Best regards, Pedro Vasconcelos __

Re: [Haskell] Question about Infix/Postfix Operators in Haskell

2004-10-18 Thread Pedro Vasconcelos
: x = x `Plus` x Another possiblity: define a new operator (let's call it $+) and you do without the backquotes: infixl 5 $+ ($+) :: Int->Int->Int x $+ y = x+y times2 x = x $+ x This way you can specify the associativy and binding precedence