comparison doc/intro.ur @ 1814:2d9f831d45c9

Update tutorial for Ur/Web changes
author Adam Chlipala <adam@chlipala.net>
date Mon, 03 Sep 2012 09:51:23 -0400
parents a479947efbcd
children 544199d8b14a
comparison
equal deleted inserted replaced
1813:4c61bb7acb9b 1814:2d9f831d45c9
383 val double_int : double int 383 val double_int : double int
384 val double_string : double string 384 val double_string : double string
385 end 385 end
386 386
387 structure Double : DOUBLE = struct 387 structure Double : DOUBLE = struct
388 class double a = a -> a 388 con double a = a -> a
389 389
390 fun double [a] (f : double a) (x : a) : a = f x 390 fun double [a] (f : double a) (x : a) : a = f x
391 fun mkDouble [a] (f : a -> a) : double a = f 391 fun mkDouble [a] (f : a -> a) : double a = f
392 392
393 val double_int = mkDouble (times 2) 393 val double_int = mkDouble (times 2)
418 val ok_int : ok int 418 val ok_int : ok int
419 val ok_float : ok float 419 val ok_float : ok float
420 end 420 end
421 421
422 structure OkType : OK_TYPE = struct 422 structure OkType : OK_TYPE = struct
423 class ok a = unit 423 con ok a = unit
424 fun importantOperation [a] (_ : ok a) (_ : a) = "You found an OK value!" 424 fun importantOperation [a] (_ : ok a) (_ : a) = "You found an OK value!"
425 val ok_int = () 425 val ok_int = ()
426 val ok_float = () 426 val ok_float = ()
427 end 427 end
428 428