Consider the following straightforward mutable queue implementation using two stacks:
type 'a adt_queue = {
mutable head : 'a head;
mutable tail : 'a tail;
}| -------------------------------------------- | |
| Version: 1.45.1 | |
| Commit: 5763d909d5f12fe19f215cbfdd29a91c0fa9208a | |
| Date: 2020-05-14T08:33:47.663Z | |
| Electron: 7.2.4 | |
| Chrome: 78.0.3904.130 | |
| Node.js: 12.8.1 | |
| V8: 7.8.279.23-electron.0 | |
| OS: Darwin x64 18.5.0 | |
| ------------------------------------------- |
| type NatModule<Nat> = { | |
| zero: Nat; | |
| one: Nat; | |
| add: (x: Nat, y: Nat) => Nat; | |
| }; | |
| const NatModule = <A>(cb: <Nat>(Nat: NatModule<Nat>) => A) => { | |
| const zero = 0; | |
| const one = 1; |
| module type T = sig | |
| module type S | |
| end | |
| module T = struct | |
| module type S = T | |
| end | |
| module type K_Bool = functor (X : T) (Y : T) -> T |
Enterprise software often has more non-functional requirements to fulfill because of the nature of the business of large companies. Think about it! Large companies often buy smaller ones. When that happens, some integration work of the two companies is imminent. Very often the case is that there is a mismatch between the acquiring and the acquired company's software stack. For example: