aboutsummaryrefslogtreecommitdiff
path: root/hol-light/TacticRecording/lib.ml
diff options
context:
space:
mode:
authormark2012-02-24 12:07:26 +0000
committermark2012-02-24 12:07:26 +0000
commitcf0c3e813e4601f7462268703efd5b14424bd6c3 (patch)
tree5ed504ddfb01b33857d9d235c35787e7f996fc54 /hol-light/TacticRecording/lib.ml
parent4ed83bcb88f220cc08c3223bd4f274eaa5f31e0c (diff)
Remove option aspect of 'finfo' datatype, and rename datatype to 'mldata'.
Add wrapper function for :thm -> thm list. Promote more objects.
Diffstat (limited to 'hol-light/TacticRecording/lib.ml')
-rw-r--r--hol-light/TacticRecording/lib.ml9
1 files changed, 9 insertions, 0 deletions
diff --git a/hol-light/TacticRecording/lib.ml b/hol-light/TacticRecording/lib.ml
index b1309f84..5de28331 100644
--- a/hol-light/TacticRecording/lib.ml
+++ b/hol-light/TacticRecording/lib.ml
@@ -19,6 +19,15 @@ let rec foldr f xs a =
| [] -> a;;
+(* foldr1 : ('a -> 'a -> 'a) -> 'a list -> 'a *)
+
+let rec foldr1 f xs =
+ match xs with
+ x::[] -> x
+ | x1::xs2 -> f x1 (foldr1 f xs2)
+ | [] -> failwith "foldr1: Empty list";;
+
+
(* foldl : ('b -> 'a -> 'b) -> 'b -> 'a list -> 'b *)
let rec foldl f a xs =