package knights_tour
- Overview
- No Docs
You can search for identifiers within the package.
in-package search v0.2.0
Solves the 'Knights Tour' and various 'Poyomino' puzzles
Install
dune-project
Dependency
Authors
Maintainers
Sources
knights_tour-0.0.6.tbz
sha256=770624ae4e35d5a58188a1f25e16730d186df8bc4397827fe9a798ea5ca574e3
sha512=b6c7b2473ddf321afaac6b668f9c6820fb8cc872abc494b69edfdff4101c6b660645837b04801e2917c38dd9f19f79bb0a7b029d59a58ddf1e3a235659bab099
doc/src/knights_tour.collections/dlist_itf.ml.html
Source file dlist_itf.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
module type S = sig (** A ['a t] is a Dlist containing elements of type ['a]. A Dlist, short for double-ended list, is a purely functional ordered list of elements that can be accessed both from the front and the back. *) type 'a t (** A name for the datatype, there are different implementations of this interface, you can check this name to identify which implementation you are using. *) val name : string (** An empty Dlist, contains no elements. *) val empty : 'a t (** [is_empty t] is true iff there are no elements in [t]. *) val is_empty : 'a t -> bool (** [map f t] applies a function to each element of t, creating a new Dlist with the results. *) val map : ('a -> 'b) -> 'a t -> 'b t (** Creates a Dlist containing a single element. *) val singleton : 'a -> 'a t (** [size t] returns the number of elements in [t]. This operation is O(1). *) val size : 'a t -> int (** [push el t] Adds an element to the front of [t]. *) val push : 'a -> 'a t -> 'a t (** [pop el t] Removes an element from the front of t.*) val pop : 'a t -> ('a * 'a t) option (** [push_end el t] Adds an element to the end of [t]. *) val push_end : 'a -> 'a t -> 'a t (** [pop_end el t] Removes an element from the end of [t]. *) val pop_end : 'a t -> ('a * 'a t) option (** [append s1 s2] Creates Dlist that contains all elements of [s1] followed by all elements of [s2]. *) val append : 'a t -> 'a t -> 'a t (** [of_list elements] Creates a [Dlist] from the elements of the list. The front of the list will become the front ot the [Dlist]. The first element you [pop] from the [Dlist] will be the first element in the list.*) val of_list : 'a list -> 'a t (** Converts Dlist into a string revealing its internal structure. Useful for debugging and testing. *) val to_string : ('a -> string) -> 'a t -> string (** [get i s] finds element at index i from the front. For example [get 0 s] is equivalent [pop s] *) val get : int -> 'a t -> 'a (** [to_list s] converts a Dlist into a list by popping all elements from the front. *) val to_list : 'a t -> 'a list end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>