Browse files

Add #2 and #3 examples

  • Loading branch information...
1 parent b9c79cd commit a792cd92caa70f55d6ddf73b6ec03c065682a825 @samoht samoht committed Sep 21, 2012
Showing with 14 additions and 15 deletions.
  1. +10 −15 tests/partial.mlp
  2. +4 −0 tests/semisemi.ml
View
25 tests/partial.mlp
@@ -1,15 +1,10 @@
- let x = 3
-
- let y = 4
-
- match x with
- | None -> ()
- | xx
-
- | u ->
-
- let f () = fun x -> x + 1
-
-
- gggg
- let x = 3
+let (quot, _rem) =
+ let quot_rem n k =
+ let (d, m) = (n / k, n mod k) in
+if d < 0 && m > 0 then (d+1, m-k)
+else (d, m)
+ in
+ let quot n k = fst (quot_rem n k) in
+ let rem n k = snd (quot_rem n k) in
+
+quot, rem
View
4 tests/semisemi.ml
@@ -0,0 +1,4 @@
+module M = struct
+ let () = ()
+ ;;
+end

0 comments on commit a792cd9

Please sign in to comment.