Quantcast
Channel: Active questions tagged ocaml - Stack Overflow
Viewing all articles
Browse latest Browse all 591

Split list into list of lists with a list as a parameter for where to split OCaml

$
0
0

I am new to OCaml and curious as to how to write a function called Seperate_by that takes in two parameters, a list and a list of elements on where to split the original list.

For example,

Seperate_by [1;2;3;4;5;6;7] [3;5]

Should have an output of [[1;2];[4];[6;7]] .


Viewing all articles
Browse latest Browse all 591

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>