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
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
-> 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
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
__
: 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