Commit a6d97d4f authored by POTTIER Francois's avatar POTTIER Francois
Browse files

Added [Seq.concat].

parent 0d6751fd
...@@ -26,3 +26,10 @@ let rec elements xs accu = ...@@ -26,3 +26,10 @@ let rec elements xs accu =
let elements xs = let elements xs =
elements xs [] elements xs []
let rec concat xss =
match xss with
| [] ->
empty
| xs :: xss ->
append xs (concat xss)
...@@ -7,3 +7,4 @@ val empty: 'a seq ...@@ -7,3 +7,4 @@ val empty: 'a seq
val singleton: 'a -> 'a seq val singleton: 'a -> 'a seq
val append: 'a seq -> 'a seq -> 'a seq val append: 'a seq -> 'a seq -> 'a seq
val elements: 'a seq -> 'a list val elements: 'a seq -> 'a list
val concat: 'a seq list -> 'a seq
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment