[sledge] Add Random access list module

Reviewed By: ngorogiannis

Differential Revision: D27996962

fbshipit-source-id: ad07bafd3
master
Josh Berdine 4 years ago committed by Facebook GitHub Bot
parent ac3ec112e8
commit de4ad53ebc

@ -45,6 +45,7 @@ module Multiset = Multiset
module Option = Option
include Option.Import
module Q = Q_ext
module RAL = Ral
module Set = NSSet
module Sign = Sign
module String = String

@ -155,6 +155,7 @@ type ('a, 'b) zero_one_many2 = Zero2 | One2 of 'a * 'b | Many2
module Pair = Containers.Pair
module List = List
module RAL = Ral
module Array = Array
module IArray = IArray
include module type of IArray.Import

@ -0,0 +1,14 @@
(*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
open! NS0
include CCRAL
let pp ?pre ?suf sep pp_elt fs ral =
List.pp ?pre ?suf sep pp_elt fs (to_list ral)
let fold l s ~f = fold ~f:(fun s x -> f x s) ~x:s l

@ -0,0 +1,18 @@
(*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
open! NS0
include module type of CCRAL
val pp :
?pre:(unit, unit) fmt
-> ?suf:(unit, unit) fmt
-> (unit, unit) fmt
-> 'a pp
-> 'a t pp
val fold : 'a t -> 's -> f:('a -> 's -> 's) -> 's
Loading…
Cancel
Save