-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfibonacci.mli
More file actions
34 lines (24 loc) · 1.14 KB
/
Copy pathfibonacci.mli
File metadata and controls
34 lines (24 loc) · 1.14 KB
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
open Ast
(** An abstract module type that is meant to structure the CFU modules
(ie. Aritmetic functions, calculus functions, statistics functions).
A module that matches [CFU_sig] is suitable for use in the [Calc] module. *)
module type CFU_sig = sig
(** An [operation_list] is an association list that maps operation
symbols to functions *)
val operation_list : (string * ( value list -> value )) list
end
module type Fib_Funcs = sig
(** [nth n] returns the value at position [n] in the fibonacci sequence *)
val nth : value list -> value
(** [lst n] gives the first [n] values in the fibonacci sequence *)
val lst : value list -> value
(** [nfib_list b n] is the first [n] elements of of b-nacci sequence *)
val nfib_list : value list -> value
end
(** [Fib_Functions] is a module that implements the function values defined in
module type [Fib_Funcs]. This contains all the fibonacci functionalities
of CAMLCALC *)
module Fib_Functions : Fib_Funcs
(** [Fib_CFU] is a module of type [CFU_sig] that contains the [operation_list]
that maps operation symbols to fibonacci functions *)
module Fib_CFU : CFU_sig