package ocamlformat-mlx-lib

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file list_ext.ml

1
2
3
4
5
6
7
8
9
10
11
12
include Base.List

let partition_map l ~f =
  let fst, snd =
    fold_left l
      ~f:(fun (fst, snd) x ->
        match f x with
        | Base.Either.First x' -> (x' :: fst, snd)
        | Base.Either.Second x' -> (fst, x' :: snd))
      ~init:([], [])
  in
  (rev fst, rev snd)
OCaml

Innovation. Community. Security.