) ||| jj;;
Exception: Nothing.
But if I try :
try (raise Nothing) with
| Nothing - (try jjwith
| Nothing - raise Nothing);;
- : string = jj
--
Vincent Aravantinos
Postdoctoral Fellow, Concordia University, Hardware Verification Group
http://users.encs.concordia.ca/~vincent
documentation which is particularly needed when
many modules are interacting.
But then this documentation argument is a bit contradictory with what we
sell to beginners when they learn Ocaml: Ocaml is great because it has
type inference, this removes verbosity!...
--
Vincent Aravantinos
Postdoctoral
Then:
# let n = Vec.make 2 5;;
val n : Vec.t = {Vec.x = 2; Vec.y = 5}
# open Vec.Type;;
# let m = {x=1;y=2};;
val m : Vec.Type.t = {x = 1; y = 2}
# Vec.add m n;;
- : Vec.t = {Vec.x = 3; Vec.y = 7}
Cheers
--
Vincent Aravantinos - Postdoctoral Fellow, Concordia University, Hardware
Verification
).
--
Vincent Aravantinos
PostDoctoral fellow, Concordia University, Hardware Verification Group
http://users.encs.concordia.ca/~vincent
Le 2 nov. 11 à 19:01, Gabriel Scherer a écrit :
I see that you solved your problem in a way you find satisfying, but I
would like to point out that the reason why your
values should start with a low case char: EmptyGraph - emptyGraph,
AddNode - addNode
Le 7 oct. 11 à 12:57, Walter Cazzola a écrit :
Dear all,
sorry for being so dumb but I've still problems with types and the sig
syntax.
I'm trying to write a Graph ADT:
module type GraphADT =
sig