OCaml Planet
48 FOLLOWERS
OCaml Planet is a community-driven website, created by and for OCaml developers and those interested in the language. OCaml is a general-purpose industrial-strength programming language with an emphasis on expressiveness and safety.
OCaml Planet
2w ago
let rec replace = function | [] -> [] | w :: words -> List.assoc w dict :: words
let () = let words = Array.to_list Sys.argv in List.iter print_endline (replace words ..read more
OCaml Planet
2w ago
let show_cmd cmd = match cmd with | To_list -> "To_list" | Sort -> "Sort" | Set (x, y) -> Printf.sprintf "Set (%i, %F)" x y
let floatarray_size = 12 let init_sut () = Float.Array.make floatarray_size 1.0 let cleanup _ = ()
let init_state = List.init floatarray_size (fun _ -> 1.0)
let next_state f s = match f with | To_list -> s | Sort -> List.sort Float.compare s | Set (i,f) -> List.mapi (fun j f' -> if i=j then f else f') s
let postcond f (s:float list) res = match f, res with | To_list, Res ((List Float,),fs) -> List.equal Float.equal fs s | Sort, Res ((Unit,),r ..read more
OCaml Planet
2w ago
let get_syntax_doc cursor_loc node = match node with | (, Type_kind Ttype_variant ) :: (, Type_declaration ) :: -> Some { name = "Type Variant"; description = "Represent's data that may take on multiple different forms."; documentation = "https://v2.ocaml.../typev.html"; } ... | -> None ..read more
OCaml Planet
3w ago
Performance engineering of MirageVPN, speeding it up by a factor of 25 ..read more