Sha256: 04535d2dafe1d72fb2a33c6e7e742552e817390e109b968b9c3e53d8723abd1c

Contents?: true

Size: 1019 Bytes

Versions: 151

Compression:

Stored size: 1019 Bytes

Contents

type palindrome_products = {
  value : int;
  factors : (int * int) list;
}

(* Returns the smallest palindrome with factors in the given range, or an appropriate
   error result if the range is ill specified, or there are no palindromes in the range. *)
val smallest : min : int -> max : int -> (palindrome_products, string) result

(* Returns the largest palindrome with factors in the given range, or an appropriate
   error result if the range is ill specified, or there are no palindromes in the range. *)
val largest : min : int -> max : int -> (palindrome_products, string) result

(* These are helper functions for tests. They can be written by hand, or using ppx_deriving
   https://github.com/ocaml-ppx/ppx_deriving/blob/master/README.md.
*)

(* Returns a string representation of a palindrome_products. *)
val show_palindrome_products : palindrome_products -> string

(* Returns true if two palindrome_products are equal. *)
val equal_palindrome_products : palindrome_products -> palindrome_products -> bool

Version data entries

151 entries across 151 versions & 1 rubygems

Version Path
trackler-2.2.1.139 tracks/ocaml/exercises/palindrome-products/palindrome_products.mli
trackler-2.2.1.138 tracks/ocaml/exercises/palindrome-products/palindrome_products.mli
trackler-2.2.1.137 tracks/ocaml/exercises/palindrome-products/palindrome_products.mli
trackler-2.2.1.136 tracks/ocaml/exercises/palindrome-products/palindrome_products.mli
trackler-2.2.1.135 tracks/ocaml/exercises/palindrome-products/palindrome_products.mli
trackler-2.2.1.134 tracks/ocaml/exercises/palindrome-products/palindrome_products.mli
trackler-2.2.1.133 tracks/ocaml/exercises/palindrome-products/palindrome_products.mli
trackler-2.2.1.132 tracks/ocaml/exercises/palindrome-products/palindrome_products.mli
trackler-2.2.1.131 tracks/ocaml/exercises/palindrome-products/palindrome_products.mli
trackler-2.2.1.130 tracks/ocaml/exercises/palindrome-products/palindrome_products.mli
trackler-2.2.1.129 tracks/ocaml/exercises/palindrome-products/palindrome_products.mli
trackler-2.2.1.128 tracks/ocaml/exercises/palindrome-products/palindrome_products.mli
trackler-2.2.1.127 tracks/ocaml/exercises/palindrome-products/palindrome_products.mli
trackler-2.2.1.126 tracks/ocaml/exercises/palindrome-products/palindrome_products.mli
trackler-2.2.1.125 tracks/ocaml/exercises/palindrome-products/palindrome_products.mli
trackler-2.2.1.124 tracks/ocaml/exercises/palindrome-products/palindrome_products.mli
trackler-2.2.1.123 tracks/ocaml/exercises/palindrome-products/palindrome_products.mli
trackler-2.2.1.122 tracks/ocaml/exercises/palindrome-products/palindrome_products.mli
trackler-2.2.1.121 tracks/ocaml/exercises/palindrome-products/palindrome_products.mli
trackler-2.2.1.120 tracks/ocaml/exercises/palindrome-products/palindrome_products.mli