summaryrefslogtreecommitdiff
path: root/my_list.mli
diff options
context:
space:
mode:
authorOlivier Gayot <olivier.gayot@sigexec.com>2018-07-11 20:58:53 +0200
committerOlivier Gayot <olivier.gayot@sigexec.com>2018-07-11 20:58:53 +0200
commit5374fa0f4b0e2e8fb93fb73ee3a1abef84c0b786 (patch)
treef3f342624d6c2ed6adaee8273e6f6fdd88b716f8 /my_list.mli
parentaa5685a9287de16d887abf7f276f6159879b3b49 (diff)
Add the rev_append function
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Diffstat (limited to 'my_list.mli')
-rw-r--r--my_list.mli4
1 files changed, 4 insertions, 0 deletions
diff --git a/my_list.mli b/my_list.mli
index 9229064..72535d5 100644
--- a/my_list.mli
+++ b/my_list.mli
@@ -66,3 +66,7 @@ let rec append l1 l2 =
match l1 with
| Item(hd, tl) -> Item(hd, (append tl l2))
| None -> l2
+
+(** Return a list which results in the concatenation of reversed l1 and l2. *)
+let rev_append l1 l2 =
+ append (rev l1) l2