Skip to content

Commit

Permalink
types: add Headers.singleton
Browse files Browse the repository at this point in the history
  • Loading branch information
anmonteiro committed Nov 30, 2024
1 parent 7de12df commit 3e283c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions types/headers.ml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ type t = (name * value) list

let empty : t = []

let singleton nv = [ nv ]

let of_rev_list t = t
let of_list t = of_rev_list (List.rev t)
let to_rev_list t = t
Expand Down
1 change: 1 addition & 0 deletions types/headers.mli
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ type value = string
val ci_equal : string -> string -> bool

val empty : t
val singleton : (name * value) -> t

val of_list : (name * value) list -> t
val of_rev_list : (name * value) list -> t
Expand Down

0 comments on commit 3e283c3

Please sign in to comment.